Questions tagged [graphql-kotlin]

10 questions
3
votes
0 answers

Apollo Server federation resolvers: how to gracefully handle entity not found?

When using GraphQL federated resolvers to resolve an array, and one of the resolved items cannot be found: Observed behaviour: null data returned for entire query, no error message. Desired behaviour: the item which cannot be resolved is silently…
Fletch
  • 4,829
  • 2
  • 41
  • 55
2
votes
0 answers

Blocking problem of graphql-kotlin with DataLoader&BatchLoader

I used the framework "https://github.com/ExpediaGroup/graphql-kotlin" to learn graphql programming of kotlin under springframework. I used DataLoader&BatchLoader to resolve the 'N+1' loading problem. When the scope of DataLoader objects is…
Tao Chen
  • 197
  • 10
2
votes
4 answers

How do you handle adding a CORS header in a Spring Boot server with graphql-kotlin?

I am building a simple Spring Server project using the GraphQL Kotlin library created & open-sourced by Expedia. I have a backend up and running, talking to the datastore, and I'm able to fetch data by sending queries via Playground. When I try to…
Tim Keating
  • 6,443
  • 4
  • 47
  • 53
1
vote
1 answer

Spring Kotlin RouterFunction endpoints with coroutines coRouter returns 404

I'm trying to set up the Spring Kotlin server with graphql-kotlin for the graphql, but it seems configuring the coRouter doesn't work (all routes return 404), which prevents the graphql to create all the routes. I've tried changing the Spring…
1
vote
1 answer

Getting Unsupported token `on` [GraphQL]

Issue: We goto 'on' in the query, while build apollo is complaining about the on keyword in the query (*.graphql) GraphQL query: query TimeLine($inputData: InputData!) { getTimeLine(inputData: $inputData) { on updated …
Amit
  • 229
  • 5
  • 20
0
votes
0 answers

How to handle a shared GraphQL type when some implementations use a data loader and some do not?

Using graphql-kotlin, we want to set up a global type that will enforce the same schema across multiple queries. Each query will have different starting data depending on the use case, meaning the method to source the data is different per…
michjo
  • 407
  • 2
  • 17
0
votes
1 answer

Reference a GraphQL-Kotlin `schemaFile` from a dependency jar in Gradle Ktl build

I'm trying to convert a working Maven project to Gradle and I'm having issues while trying to convert GraphQL-Kotlin configuration which requires a schema provided by another jar dependency. I think this might not even be GraphQL-Kotlin specific, I…
Mike Minicki
  • 8,216
  • 11
  • 39
  • 43
0
votes
0 answers

Apollo client and DGS server integration conflict on 2 schemas

For using apollo client, it needs to download "schema.graphqls" from the server we are going to send queries to. It is stored under "main/graphql". For using DGS server we need to have our "schema.graphqls" file, which is created under…
0
votes
1 answer

How to suppress field from GraphQLClientRequest request body?

When I use ExpediaGroup graphql-kotlin client to call a GQL query, it inserts a field besides the query, variables and operationName. I understand this field comes from my extended class constructor parameter. I don't need this field. Is there a way…
heringer
  • 2,698
  • 1
  • 20
  • 33
0
votes
2 answers

How to upload with ExpediaGroup's graphql-kotlin?

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…
Andras Hatvani
  • 4,346
  • 4
  • 29
  • 45