Skip to content

Adding extensions to query fields #215

Answered by hayes
mmahalwy asked this question in Q&A
Nov 13, 2021 · 3 comments · 17 replies
Discussion options

You must be logged in to vote

I think you are conflating 2 separate concepts:

  1. the graphql library has a concept of extensions that are basically just objects that exists on most objects that make up a graphql schema (types, fields, etc). This is used in a lot of different ways, but mostly commonly this is the mechanism decorators attach data to a schema in a way that can be accessed at runtime. These extensions are frequently accessed through the info object when a resolver is wrapped by a plugin or decorator.
  2. Apollo-server has attaches an "extensions" object to responses, this is completely unrelated to the extensions properties added in your schema. This property is attached by apollo plugins, and is a non-standard…

Replies: 3 comments 17 replies

Comment options

You must be logged in to vote
1 reply
@hayes
Comment options

Comment options

You must be logged in to vote
5 replies
@hayes
Comment options

@mmahalwy
Comment options

@mmahalwy
Comment options

@mmahalwy
Comment options

@hayes
Comment options

Comment options

You must be logged in to vote
11 replies
@mmahalwy
Comment options

@hayes
Comment options

@mmahalwy
Comment options

@hayes
Comment options

@mmahalwy
Comment options

Answer selected by mmahalwy
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