Skip to content

How can we add a new field to an existing schema using graphql-tools #3650

Answered by ardatan
Ramakant2021 asked this question in Q&A
Discussion options

You must be logged in to vote

You can use mergeSchemas from @graphql-tools/merge
https://www.graphql-tools.com/docs/schema-merging

mergeSchemas({
  schemas: [schema],
  typeDefs: ``, // Additional typeDefs here
  resolvers: {} // Additional resolvers here
})

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by Ramakant2021
Comment options

You must be logged in to vote
2 replies
@ardatan
Comment options

@Ramakant2021
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants