herder
08/27/2020, 5:55 AMGraphQLContext
to be able to customize a callout to an external service, but I can't find how to get hold of the actual query body from the request? Is there a way to get hold of the raw query when creating my context?Dariusz Kuc
08/27/2020, 12:55 PMgraphql-kotlin-spring-server
, creation of context happens before parsing of the queryherder
08/27/2020, 1:59 PMrequest.formData
that is supposed to be cached, but I don't find any payload thereDariusz Kuc
08/27/2020, 2:02 PMherder
08/27/2020, 2:05 PMDariusz Kuc
08/27/2020, 2:05 PMherder
08/27/2020, 2:05 PMDariusz Kuc
08/27/2020, 2:06 PMShane Myrick
08/27/2020, 7:10 PMDataFetchingEnvironment
in the query is probably best: https://expediagroup.github.io/graphql-kotlin/docs/schema-generator/execution/data-fetching-environmentherder
08/28/2020, 10:51 AMGraphQlContext
there, and if the GraphQlContext
implements some marker interface like GraphQlRequestAware
it injects the constructed query there via some setter.
Would that make any sense? I'm a bit new to the project, so would appreciate any feedback 🙂Dariusz Kuc
08/28/2020, 8:32 PMDataFetchingEnvironment
is available when resolving any field but graphql-kotlin
can automatically inject it as a function parameter, e.g. your top level query where you can read it and then apply some custom logic based on it (i.e. call X or Y)
can you elaborate more on your use case? it sounds like you are trying to do something that you probably should not be doing (or there is a simpler way of doing it)herder
08/29/2020, 1:23 PM