Questions tagged [graphql-tools]

A set of utilities to build your JavaScript GraphQL schema in a concise and powerful way.

GraphQL Tools is an npm package and an opinionated structure for how to build a GraphQL schema and resolvers in JavaScript, following the GraphQL-first development workflow.

Documentation

Repository

115 questions
0
votes
1 answer

graphql - resolver root/parent property is null

Given this schema: const typeDefs = gql`type Asset { id: ID! name: String! ScanProfiles: [ScanProfile] } type ScanProfile { id: ID! name: String! Assets: [Asset] } type Query { Asset(id: ID!): Asset ScanProfile(id: ID!):…
Plummer
  • 6,522
  • 13
  • 47
  • 75
0
votes
1 answer

Nested resolver in "graphql-tools" not working

I am not able to call nested resolvers using graphql-tools. I have filed bug on github but haven't got any reply yet. https://github.com/apollographql/graphql-tools/issues/1026. Nested fields of my schema are not getting called while…
HDB
  • 782
  • 2
  • 7
  • 18
0
votes
1 answer

migrating from apollo 2 - mergeSchemas doesn't except GraphQLSchema

I'm using Apollo 1 server, and i'm trying to migrate to Apollo 2. My project includes 2 simple GraphQLSchema: const missionSchema = new GraphQLSchema({query: missionQuery, mutation: missionMutation}); const userSchema = new GraphQLSchema({query:…
idosh
  • 157
  • 1
  • 13
0
votes
1 answer

Using input types of the same object in different mutations

I have an input type that I want to use across multiple mutations. The only difference between its use from one mutation to another is the mandatory property of its fields. Let's say for example that I have the following input type that I use in a…
Strider
  • 3,539
  • 5
  • 32
  • 60
0
votes
1 answer

GraphQL - Schema Delegation on Schema Stitching is not working if the Parent return type is a list of Objects

I have a Publication object that includes an imageId which I want to use to create a schema delegation and load the whole object. Publication Type is defined as: const PublicationType = new GraphQLObjectType({ name: 'Publication', description:…
Adel Bachene
  • 974
  • 1
  • 14
  • 34
0
votes
2 answers

Error: There can be only one fragment named "fragmentName"

I am changing the format of my schema from this: var OldSchema = new GraphQLSchema({ query: queryType, mutation: mutationType }); to this: typeDef = ` type Query { posts: [Post] author: Author } `; const NewSchema = makeExecutableSchema({ …
Adolfo
  • 1,315
  • 2
  • 14
  • 22
0
votes
1 answer

Graphql pulling data for pagination

I have the following schema User { username: String! name: String! posts(page: Int!): [Post] } Post { title: String! description: String } And in query type Query { user(username: String!): User } In the resolvers I have…
pewpewlasers
  • 3,025
  • 4
  • 31
  • 58
0
votes
1 answer

graphql schema stitching with auth

My idea is to create a microservice approch with graphql and serverless. I'am thinking about creating a service for every table in the dynamodb and then create a apigateway service, and in the apigateway service use graphql-tool to stitch the…
0
votes
1 answer

Alias type names of remote GraphQL schema

I am using makeRemoteExecutableSchema in graphql-tools to retrieve a remote schema and I am then merging it with a local schema. I would like to add a prefix to the type names on the remote schema. Is there an easy way to do this?
Jonathan Byrne
  • 193
  • 1
  • 11
-1
votes
1 answer

Remote schema stitching with latest versions of Apollo and GraphQL tools

i'm having a hard time figuring out the problem with my setup. I have been looking at the documentations but between apollo and graphql-tools the APIs changed frequently. When i run this script, the console says "Error: Query root type must be…
1 2 3 4 5 6 7
8