Tag: graphql-java
-
Dynamic generate GraphQL schema supports
11 Is it possible to dynamically create a GraphQL schema ? We store the data in mongoDB and there is a possibility of new fields getting added. We do not want any code change to happen for this newly added field in the mongoDB document. Is there any way we can generate the schema dynamically…
-
GraphQL hide certain fields from a response
0 I am completely new to GraphQL – apologies if this is a stupid question. I have a Spring Boot application running GraphQL and have two endpoints as defined in my schema below: type Query { userById(id: ID): User getMe: User } type User { id: ID! email: String! firstName: String! lastName: String! } getMe…
-
Microservice Communication for Graphql APIs
1 Problem Statement : I have a GraphQl query defined which is responsible for fetching few details from the database. This graphql schema let’s say is defined in microservice-B . Now I want this garphql API to be called by an upstream microservice-A. microservice-A is actually the one which is actually called by our Clients(UI…
-
Use introspection query without authentication in graphql-spring-boot-starter
5 Using the graphql-spring-boot-starter library https://github.com/graphql-java-kickstart/graphql-spring-boot, is it possible to secure all requests but allow only the graphql introspection query with authentication? The project has enabled Spring security to use OAuth2 so every request is secured. Thanks for any hint or help. spring-boot spring-security graphql graphql-java Share Improve this question Follow asked Nov 13, 2019…
-
Is GraphQL cancelling data fetching in case of a failure?
3 I am trying to understand if (Java) implementation of GraphQL is smart enough to cancel scheduled fetching of data if an exception is thrown during execution of one of the fetchers? An example would be that I run a single query to retrieve all orders for a customer. Let’s say that the customer has…
-
Generate query for Spring method with @GraphQLQuery
0 I have method: @GraphQLQuery(name = "events", description = "get all events") public List<String> getEvents() { return List.of("test", "test2"); } I need to create query for clients. below example not work: query events{ events{ … String } } what is wrong? spring graphql graphql-java Share Improve this question Follow asked Jun 23 at 13:27 user11149927user11149927…
-
Using the Apollo GraphQL client for Android
3 I am using from the below sample, but it gets me an error when I add libraries: Using the Apollo GraphQL client for Android Below is my build.gradle file (project): // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories { jcenter() maven { url "https://jitpack.io" }…
-
How to upload with ExpediaGroup’s graphql-kotlin?
0 There’s nothing related to file upload in the examples under https://github.com/ExpediaGroup/graphql-kotlin/tree/master/examples/server/spring-server/src/main/kotlin/com/expediagroup/graphql/examples/server/spring. I’d like to upload 5 files at once and although I think it should be a mutation I’m not sure whether it should go like this: class UploadMutation: Mutation { fun upload(files: FilePart) { print("$files") } } The context is obviously Spring Boot…