Skip to content
\n

There is no way of knowing how to merge these two fields together because the semantics are not clear.
\nEven worse are custom operation directives on fragment spreads like this:

\n
{ \n  ... @foo {\n    ... @bar {\n       hello\n    }\n  }
\n

What does this mean?

\n

I see two approaches here: retain simply the custom operation directives inside the NormalizedOperation as additional metadata as much as possible
\nor provide hooks/callbacks during the creation of NFs to implement custom semantics.

\n

Coming back to your question: I hope this answered your first question at least partially. Happy to share more details.

\n
\n

Is this something we should look at it if we want to contribute changes to support caching of the executable document?

\n
\n

Yes please. Maybe you could share more details what exactly you use ENFs for and what you look into it.

\n
\n

Do you have a rough timeline of when you expect to move this to mainstream support?

\n
\n

As soon as we have some more real life validation that it is useful we can mark them public instead of experimental. Experimental is simply a way (in this case at least) to iterate faster as we can brake the contract as needed.

","upvoteCount":2,"url":"https://github.com/graphql-java/graphql-java/discussions/3938#discussioncomment-12979569"}}}
Discussion options

You must be logged in to vote

Hi @timward60 ... thanks a lot for your interest.

Let me try to give some context and my thinking behind the normalized stuff, because this has never been properly documented so far:

Originally the ENF was introduced mainly for the Nadel project https://github.com/atlassian-labs/nadel because it allows for a much more simpler and efficient way of rewriting/transforming requests. But over time it proved to be useful in other cases too: for example it is used inside the DataFetchingEnvironment to look ahead or used to calculate query complexity in certain cases.

The main "problem" with ENF is that it requires variables as input (hence it is called ExecutableNormalized and not just normalized).

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by timward60
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