Tag: apollo
-
Apollo client: mutate is not a function
2 I am calling this component from a parent component that is passing props thru the argument fields. However When I try to call the mutation function I keep getting the error: mutate is not a function. I dont understand what is causing this issue as I followed the apollo documentation online almost exactly. const…
-
Cross-referencing a type with Apollo Federation across multiple sub-graphs
0 I am new to Apollo Federation and I am having the following issue / question: In Subgraph A I have the following: type Product @key(fields: "id") { { id: ID! title: String } In Subgraph B I have the following: type Product @key(fields: "id") { { id: ID! related: [Product] } When I run…
-
graphql codegen defaults to watchQuery, no possible way to alter? I only want to get the value 1 time
1 I have a sveltekit + apollo graphql project here. introspecting from my dev-env api here. The issue I’m having is the codegen with this config: import type { CodegenConfig } from ‘@graphql-codegen/cli’; const config: CodegenConfig = { schema: ‘<<<url>>>’, documents: ‘./src/lib/graphql-service/**/*.gql’, generates: { ‘./src/lib/graphql-service/generated.ts’: { plugins: [‘typescript’, ‘typescript-operations’, ‘graphql-codegen-svelte-apollo’] } }, watch: false };…
-
“”POST body missing, invalid Content-Type, or JSON object has no keys.” Error on Apollo v4
0 //Sever.js import { ApolloServer } from ‘@apollo/server’; import { startStandaloneServer } from ‘@apollo/server/standalone’; import {makeExecutableSchema} from "@graphql-tools/schema"; import {typeDefs, resolvers} from "./schema.js"; import { expressMiddleware } from ‘@apollo/server/express4’; import { ApolloServerPluginDrainHttpServer } from ‘@apollo/server/plugin/drainHttpServer’; import express from ‘express’; import http from ‘http’; import cors from ‘cors’; import bodyParser from ‘body-parser’; async function startServer(port, callback){…
-
Apollo Server 4 / Koa – Cannot read properties of undefined (reading ‘headers’)
0 i upgraded to apollo 4 and i am using koa js. But there are some problems with context. Authentication process does not work. Authentication time I get an error like this: **"message": "Cannot read properties of undefined (reading ‘headers’)" "code": "INTERNAL_SERVER_ERROR", @[email protected][email protected]/node_modules/@apollo/server/dist/esm/utils/schemaInstrumentation.js:36:28) backend/graphql/resolvers/posts.js:31:20 backend/util/check-auth.js:5:36** import { ApolloServer } from "@apollo/server"; import { ApolloServerPluginDrainHttpServer }…
-
Best practice for keeping graphql data up-to-date with apollo
0 What is the best practice for keeping subscriptions in sync with your query schemas? My previous exposure to graphQL subscriptions was from Hasura, which would implement subscriptions for every table such that when a subscribing is made, the current set would be sent over the wire (followed by any updates). const data = useSubscription(…)…
-
Using the Apollo GraphQL client for Android
3 I am using from the below sample, but it gets me an error when I add libraries: Using the Apollo GraphQL client for Android Below is my build.gradle file (project): // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories { jcenter() maven { url "https://jitpack.io" }…
-
ApolloClient not setting authorization header
0 I have an expo app that is using a graphql api endpoint. I am attempting to pass an authorization token with each request, but my set up does not seems to be setting or sending my authorization header. In my graphql.config.yml I can set the authorization header here like this and it works: schema:…
-
GraphQL: TypeError: Cannot read property of undefined
2 I have an Apollo GraphQL projects where I have created my own Query and Mutations. I have done using mock data and Query and Mutation works fine. But when I am trying to do with Sequelize ORM, I am getting the error "TypeError: Cannot read property ‘getListings’ of undefined", " at listings (/home/ayman/Desktop/apollo-graphql/graphql-app/functions/graphql.js:50:19)", "…
-
DVGA not accessible from apollo studio?
0 I am just trying out DVGA (https://github.com/dolevf/Damn-Vulnerable-GraphQL-Application) and I hosted the app on a EC2 and open port 5013 docker run -d -t -p 5013:5013 -e WEB_HOST=0.0.0.0 –name dvga dvga I understand DVGA enabled introspection by default and $ec2HOST:5013 is accessible from my browser. However, from apollo studio, URL $ec2HOST:5013/graphql is not accessible. why?…