Network error: Unexpected token < in JSON at position 0 at new ApolloError

const httpLink = createHttpLink({ uri: 'http://localhost:3090/' }) const client = new ApolloClient({ link: httpLink, cache: new InMemoryCache() }) client.query({ query: gql` query...

Jest did not exit one second after the test run has completed using express

I'm using JEST for unit testing my express routes. While running the yarn test all my test case are getting passed, but I'm getting an error Jest did not exit one second after the test run has...

Apollo Angular not sending request

I have a simple query (Apollo-Angular Client) to fetch some data from an GraphQL server public getQuestionBank(courseCode: string): Observable<ApolloQueryResult<{}>> { const query = gql` ...

Send graphQL mutation based on DynamoDb stream with NodeJS

I'm trying to update a GraphQL subscription when a DynamoDb table receives a new row. I got the following code working with only the RekognitionId, but I'm not trying to send the entire NewImage...

Modifying Response of Graphql before sent out

I am looking for a way to modify the response object of a graphql query or mutation before it gets sent out. Basically in addition the the data object, I want to have extra fields like code and...

Apollo GraphQL "Cannot return null for non-nullable field Mutation.createUser"

I know this is a somewhat common issue, but my implementation differs from the other posts. I'm using the most basic implementation which I can't get to work. I'm using Sequelize with MySQL as the...

GraphQL Error : Field is not defined in the input type

I have an error in my application. I use Next.js / ApolloClient / GraphQL and Prisma. The error concerns the GraphQL schema and it's use in Mutation: Error : Reason: 'end_date' Field 'end_date'...

Apollo codegen:generate gives error "Generating query files with 'typescript' target"

I have backend on Express with Apollo Graph. In my client React app im do next: apollo codegen:generate --excludes=node_modules/* --includes=**/*.tsx --target typescript --tagName gql --outputFlat...

GraphQL Code Generator - Cannot load my GQL Schema from Nestjs server endpoint

I'm using graphQL code generator on an angular app and I'm trying to load my schema from a local nestjs app. Here is the codegen.yml file: schema: http://localhost:3000/graphql documents:...

how to troubleshoot using the node.js GOT http request library?

I have some code using GOT querying a graphQL endpoint: // set up params for call to weather cache const queryQL = ` query weather { weather(where: {idLatLong: {_eq:...

Testing useSubscription apollo hooks with react

Testing the useSubscription hook I'm finding a bit difficult, since the method is omitted/not documented on the Apollo docs (at time of writing). Presumably, it should be mocked using the...

GraphQL: TypeError: Cannot read property of undefined

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...

Variable "$file" got invalid value {}; Upload value invalid

I am using GraphQLClient from graphql-request to send requests to my server. I am trying to upload a file by doing the following: const graphQLClient = new...

in apollo client pagination configuration with "merge" function, existing cached data always is empty even after calling fetchMore

I'm new to Apollo Client and I'm trying to implement pagination for my product list. but I can't figure out why the existing parameter in the merge function always returns empty. my incoming...

I am using vue 3 with apollo/client but getting an error

I am using vue 3 with composition api with apollo/client . I did everything from documentation but this is as far I could go.I provied a correct backend url and just cant figure it out.This is my...

Flutter test GraphQL query

I want to test my GraphQL Query. I have my GraphQL client, and I use a remote datasource to do my requests. class MockGraphQLClient extends Mock implements GraphQLClient {} void main() { ...

GraphQL/ Apollo Server: Can't Access nested object

Problem: Trying to query for products in user's basket breaks with the following error: "ID cannot represent value: <Buffer 60 41 24 0c ae a8 b6 35 ac 33 5a cd>" my query: query getBasket{ ...

Authorization in Nestjs using graphql

I have started to learn Nestjs, express and graphql. I encountered a problem while trying to authorize access of user authenticated using jwt token. I followed the tutorial for authentication on...

Apollo Client client.readQuery returning null when data is in the cache

This must be user error, but I've got an app with a simple currentUser query that looks at a JWT for an id, looks it up, and returns the appropriate user. I can look at devtools and see that it's...

watchdog.observers.Observer works in Windows, works in docker on Linux, does not work in docker on Windows

I have an interesting problem that is driving me nuts. I have a python program that is using watchdog.observers.Observer. This program (aka watcher) watches a folder and responds when files...

Category page with tags - Contentful - Next.JS

I would like to create a category page containing all tags added to articles. When clicking on a tag it should show a page with all articles containing that specific tag. I'm using Next.js, SSG,...

Getting Network request failed when uploading images with apollo client react native android

I am using ApolloClient to send mutation that contains files (images) but I am getting Error: Network request failed this what I have done to create links import { createUploadLink } from...

Unhandled Rejection (Error): Response not successful: Received status code 400 new ApolloError

I'm kind new to Apollo Client. Let's talk less and show the code. I have a server that is running and I'm trying to make a mutation using react. mutation in the server.js const RootMutationType =...

using req.headers.authorization gives Network error unable to reach server We could not introspect your endpoint graphQL Context failed: invalid token

I get the token from the login mutation and put it in the headers, but graphql server gives an error when trying to fetch that token using: const auth = req.headers.authorization; the previous...

Stop `useMutation` from re-rendering component and ignore result

I have a mutation called like this (this isn't the actual mutation call, but a minimal example): const App = () => { const [myMutation] = useMutation(gql` mutation Test($updateUserId:...

Ensure that there is only one instance of "graphql" in the node_modules directory

While trying to download the schema using npm run schema:download I am receiving the following error. [email protected] schema:download npx apollo service:download...

how to get the json response for a product url

I am trying to scrape product information from https://www.walmart.com/. I am trying to do it in two stages. Get search result products for a word Get each product data by going to the product...

How to analyze dotnet dump created in production container?

My app is running on production in mcr.microsoft.com/dotnet/aspnet:5.0-alpine container. I was able to create dump with dotnet-dump collect tool/command...

How to use Graphql typescript types in react

I have a react app with a keystone.js backend and a graphql api I have a list of products in keystones.js and a simple graphql query import gql from "graphql-tag"; export const ALL_PRODUCTS_QUERY...

AWS Graphql lambda query

I am not using AWS AppSync for this app. I have created Graphql schema, I have made my own resolvers. For each create, query, I have made each Lambda functions. I used DynamoDB Single table...