Skip to content

different behaviour with types instanciation in last update #789

Answered by mfn
crissi asked this question in Q&A
Discussion options

You must be logged in to vote

I yet have to analyze the current behaviour or change of behaviour etc.

But from my POV, nothing non-GraphQL related should be instantiated in fields or args, etc. My argument would be: these methods are a fancy way to describe a DSL and usually you don't run application instantiation related code there.

If you need access to this stuff in a resolver, the way to go would be to use the context which is essentially "a bag of things" which are passed around and you mutate as you want (dangerously like a "global").


That said: I'm now curious what your actual use case here is 😄

Replies: 3 comments 8 replies

Comment options

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

mfn Jun 1, 2021
Collaborator

Comment options

mfn
Jun 1, 2021
Collaborator

You must be logged in to vote
4 replies
@mfn
Comment options

mfn Jun 1, 2021
Collaborator

@crissi
Comment options

@crissi
Comment options

@mfn
Comment options

mfn Jun 2, 2021
Collaborator

Answer selected by crissi
Comment options

You must be logged in to vote
3 replies
@crissi
Comment options

@mfn
Comment options

mfn Jun 2, 2021
Collaborator

@crissi
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
Converted from issue

This discussion was converted from issue #788 on June 01, 2021 12:13.