Category "apollo"

What is the difference between useQuery and useLazyQuery in Apollo graphQL?

I was going through the documentation of Apollo React hooks. And saw there are two queries hooks to use for which is useQuery and useLazyQuery I was reading thi

Error: Cannot find module 'graphql/validation/rules/KnownArgumentNamesRule'

When I run the command apollo client:codegen the following error comes up : Error: Cannot find module 'graphql/validation/rules/KnownArgumentNamesRule' Requ

Why is Graphql data object only available outside the call function

I am new to graphql and react so I can't figure out why the loaded data return object is only available outside the mutation post which produced the data. Could

Document is undefined when using apollo query with next.js getServerSideProps

I am trying to use getServerSideProps to fetch a query every time this component is rendered using apollo and next.js export async function getServerSideProps(c

How to prevent re-rendering with useSubscription()?

Many of you might have heard of GraphQL. It provides QUERY and MUTATION. Also it supports SUBSCRIPTION as 100% replacement of web socket. I'm a big fan of Graph

Resolve Same Entity in Different Services

I have use-case where same entity type needs to resolved in multiple service, for example Service A has type Post type Post{ id: ID! title: String } Ser

How to refresh JWT token using Apollo and GraphQL

So we're creating a React-Native app using Apollo and GraphQL. I'm using JWT based authentication(when user logs in both an activeToken and refreshToken is crea

How to redirect in Nuxtjs when the return query of Graphql is empty

I'm very new to Nuxtjs and javascript world. The Nuxtjs project I'm working on required fetching data from Backend (Strapi) using Graphql. The goal is to make a

How to process 301 redirects with Nuxt ServerMiddleware and Apollo GraphQL

I am currently building a Vue / Nuxt app coupled with a modified Saleor installation to sell products online. As we are migrating from an existing system we ne

Ambiguos "Error: NEXUS__UNKNOWN__TYPE was already defined and imported as a type" error in nexus graphql

I'm getting the following error when using nexus to define a graphql schema with apollo-server. Error: NEXUS__UNKNOWN__TYPE was already defined and imported as

How to call a GraphQL query/mutation from an Express server backend?

My frontend is localhost:3000, and my GraphQL server is localhost:3333. I've used react-apollo to query/mutate in JSX land, but haven't made a query/mutation f

Add apollo client dev tools to chrome developer tools

I have downloaded the chrome extension Apollo Client Devtools. However it is not visible when devtools are open. Is there a way of adding this or is it a bug?

Apollo GraphQL - Import .graphql schema as typeDefs

With graphql-yoga you can simply import your schema by doing the following: typeDefs: './src/schema.graphql'. Is there a similar way of doing so with apollo-ser

Offload query parts in Apollo client

I vaguely remember Apollo supporting a directive / mechanism, which enables offloading parts of the query into a subsequent query. I know this can be achieved c

CORS issue fetching data with WPGraphQL and Next.JS

I have created a Next.js app using Wordpress as a CMS and WPGraphQL to fetch data. I have created apollo-client the following way: uri: process.env.NEXT_PUBLI

How do I solve this Apollo Control Cache error?

I am trying to set up my server side backend and I'm hitting this error: node_modules/apollo-cache-control/dist/index.d.ts:24:9 - error TS2717: Subsequent prope

GraphQL error: Field error: value is not an instance of Date

After I've installed redis-server and graphql-redis-subscriptions I receive the following error [GraphQL error]: Message: Field error: value is not an instance

How to catch server errors in Nuxt.js so it doesn't crash page render? (Vue)

Context This question is related to my other question, How to handle apollo client errors crashing page render in Nuxt? , but I'll try to keep this isolated sin

How to query with multiple 'and' conditions in where clause in Strapi, GraphQL?

Now I am trying to query with multiple _and inside where in Strapi GraphQL playground. The query I am using is: { clients( where: { _and: [{ name:

Strapi 4 and NuxtJS: Unable to connect via GraphQL (ECONNREFUSED)

I am building a small blog application using NuxtJS, Strapi 4 (and GraphQL) and apollo. To do that, i followed this tutorial: https://www.youtube.com/watch?v=yD