Tag: graphql-java
-
Injected dependencies of Controller are sometimes null when using @SchemaMapping
1 The bounty expires in 5 days. Answers to this question are eligible for a +100 reputation bounty. Benoit Cuvelier wants to draw more attention to this question. I have a problem on a SpringBoot (3.2.0) application that uses GraphQL with spring-boot-starter-graphql. I have several annotated controllers that contain some @SchemaMapping, @QueryMapping and @MutationMapping. For…
-
Graphql : Get parent’s parent source – getSource() in graphql java
0 Let say I have following schema type Org { vp: Person! employees: [Person!]! } type Person { id: ID! name: String! grade: String! @auth } I have auth directive implemented in DGS as below @DgsDirective(name = "auth") public class PrincipleAuthorizationDirective implements SchemaDirectiveWiring { @Override public GraphQLFieldDefinition onField(SchemaDirectiveWiringEnvironment<GraphQLFieldDefinition> environment) { GraphQLFieldDefinition field = environment.getElement(); GraphQLFieldsContainer…
-
In graphql what is difference between a `type query` and `extend type query`?
0 In graphql what is difference between a type query and extend type query? Ex: difference between type Query { product(id: String!): Product } and extend type Query { DeviceDetail(devId: String!): DeviceDetail } Will appreciate if you could add an example for your explanation. graphql graphql-java spring-graphql netflix-dgs Share Improve this question Follow asked 1…
-
Support for multiple paths pointing to different graphql schema
0 I have two graphql schemas that we can say one as admin and one as internal and i need to map each with a separate graphql endpoint as:- Schema – admin.graphqls, internal.graphqls /graphql/admin and /graphql/internal however the exposed configuration property we have in spring-boot-starter-graphql is a string so possible only one endpoint can be…
-
Reconfigure dataloaders when migrating from graphql-java-kickstart to spring-graphql
0 I’m in the process of migrating a GraphQl-java-kickstart project to Spring-GraphQl, as Spring-GraphQl was not available at the time when GraphQL was implemented in the project. The main reason for migrating is that the auto-configuration and annotation based approach offered by Spring may help remove much of the complex boilerplate code in the initial…
-
SpringBoot GraphQL Not exposing /graphql endpoint
2 Currently trying to setup SpringBoot and GraphQL but whenever I run the application I don’t seem to get the /graphql endpoint exposed, nor does the graphiql UI get exposed when I set it to enabled in the application.yml file. I’ve also tried setting the endpoint manually in the properties but that also isn’t exposed.…
-
How to send a file in the request body for GraphQL API and Spring-boot application using postman?
0 I am using graphQL for my APIs and now I need to receive a file in the request as a multipart file, so how to send that file using Postman to my controller? @Data public class FileDTO { private MultipartFile smsFile; } @Controller public class SMSBulkController { @Autowired ParsingService parsingService; @MutationMapping public ApiResponse<String> uploadFile(@Argument…
-
Validation error of type SubSelectionRequired: Sub selection required for type null of field
36 I am working on a graphql issue where I am getting following error for the request { customer(id: “5ed6092b-6924-4d31-92d0-b77d4d777b47”) { id firstName lastName carsInterested } } “message”: “Validation error of type SubSelectionRequired: Sub selection required for type null of field carsInterested @ ‘customer/carsInterested'”, Below is my schema type Customer { id: ID! firstName: String!…
-
Helidon: GraphQL with Stream and Defer annotation
0 I am working on a graphql API using Helidon MP and looking to confirm that directives @ stream and @defer supportable? GraphQL documentation link for reference: https://graphql.org/blog/2020-12-08-improving-latency-with-defer-and-stream-directives/ we tried GraphQL @stream and @defer annotation but its not working. We could make it work in Apollo server. graphql stream java-stream graphql-java helidon Share Follow asked…
-
How can we make sure that data being fetched in one dataFetcher being available in other dataFetcher in a grapghQL java project
0 I am very new to GraphQL. Below is my init method in my Resolver public void init() { builder.type("SystemTopic", typeWiring -> typeWiring .dataFetcher("items", this::itemsConnection).dataFetcher("payloads", this::getPayloads)); } I need the data fetched in items in fetcher in payloads fetcher. The seconds fetcher payloads execution starts before items done its job. So, some required data is…