question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Enable DataFetchingEnvironment as part of @GraphQLApi @Query methods

See original GitHub issue

Helidon Version: 2.3 Helidon SE or Helidon MP: MP JDK version: 11 OS: MacOS 11.4


Problem Description

Lets assume we have class AllResourcesthat contains Resource A,B,C…:

AllResources {
 ResourceA
 ResourceB
 ResourceC
...
}

Each resource is in different DB table, and it takes time to process each one of them. We would like to expose single endpoint and process ResourceX query only if the user request it. If it was possible to add to @Query method something like ExecutionInput it was great…

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:18

github_iconTop GitHub Comments

1reaction
dvirguttmancommented, Jul 27, 2021

Yeah, that will be great. environment.getExecutionStepInfo().getField().getSingleField().getSelectionSet().getSelections() is exactly what I need…

1reaction
dvirguttmancommented, Jul 16, 2021

Yes, that was my meaning. Thanks! Regarding the Security Context, it is possible to inject it to the bean so there is workaround for that…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Spring for GraphQL Documentation
Server transports allow intercepting requests before and after the GraphQL Java engine is called to process a request.
Read more >
DataFetchingEnvironment (graphql-java 12.0 API) - Javadoc.io
This returns the variables that have been passed into the query. Method Detail. getSource. <T> T getSource(). This is ...
Read more >
Graphql - context.unwrap(DataFetchingEnvironment.class) is ...
The context hold information about the request. So any method that is a query or mutation, or any method called by those further...
Read more >
Getting Started with GraphQL and Spring Boot - Baeldung
This works to put the control where it belongs, with the API developer specifying what's possible and the API consumer specifying what's desired ......
Read more >
Tutorial with Spring for GraphQl
Builder to register the handler method as a graphql.schema.DataFetcher for the query field bookById . In GraphQL Java, DataFetchingEnvironment provides access ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found