Category "graphql"

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

I am getting error when I am working on Strapi app using GrapQl

I am following this tutorial https://strapi.io/blog/nextjs-react-hooks-strapi-restaurants-2 My query is { restaurants { id name } }

CORS Error with dgraph and apollo graphql

I am unable to run query requests with my local dGraph server. I am running dGraph using docker compose with both zero and alpha React client side frontend usin

Cannot upload more than 5 attachments with GraphQL mutation

I am trying to attach more than 5 files with GraphQL mutation in NestJS API server. It works when the number of attachments is either 5 or less. I cannot find a

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

AWS AppSync - Defining GraphQL schema with custom directives

While defining this custom directive: directive @hashField on INPUT_FIELD_DEFINITION I get this error on the AWS AppSync (Schema tab): Error parsing sche

GraphQL with ElasticSearch and multiple indexes

I am new to GraphQL and have few questions on usage with ElasticSearch. It may not be right platform to ask as it is more like design question. But any pointers

Why doesn't GraphQL accept this scalar argument type, instead complaining "argument type must be Input Type but got: undefined"?

I have export const getPicture = { type: GraphPicture, args: { type: new GraphQLNonNull(GraphQLInt) }, resolve(_, args) { return

How to disable introspection queries with AWS appsync (GraphQL)?

With the compliance we need to remove introspection queries in production for AppSync endpoints. What is the best way to disable introspection queries with AppS

GraphQL : Not Getting EF Related objects after implementing Types

For background, I am following the tutorial here: https://www.youtube.com/watch?v=HuN94qNwQmM . As the code is too long I am putting that in git https://github.

GraphQL LSP with CoC + Neovim

I'm trying to setup a GraphQL language server for use within NVIM for linting, through CoC (Conquer of Completion). I've installed the LSP from GraphQL here but

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

AssertionError at /graphql/ Query fields must be a mapping (dict / OrderedDict) with field names as keys or a function which returns such a mapping

I am new to django and graphql, I am trying use graphql in django using the the instructions given in this site. https://docs.graphene-python.org/projects/djan

How to use 'Decimal' as a field type in GraphQL schema?

I want to use Decimal as a type for latitude & longitude field in my GraphGL schema. But GraphQL provides only Float and Int. Is there is any package to sol

Web socket problem when adding subscriptions in URQL client

I am using URQL Client with Apollo server, now I am trying to handle subscriptions on URQL client, but I can't seem to make the web socket work. Hope someone ca

How can I use redux and graphql with apollo client in the same react app?

I'm working on a project, and I'm using apollo/client, graphql in react, and for the global state management, I have to use redux. I'm quite sure I'll have to h

Cannot read properties of undefined (reading 'bind') useQuery

I have this code right here import React from "react"; import { useQuery } from "@apollo/react-hooks"; import gql from "graphql-tag"; const FETCH_POSTS_QUERY

Apollo `useMutation()` stuck loading inside Next.js component

The following form component in Next.js submits without errors but never completes the mutation. Instead it get's stuck in the loading state. import React, { us

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

Cloudfront cache with GraphQL?

At my company we're using graphql for production apps, but only for private ressources. For now our public APIs are REST APIs with a Cloudfront service for ca