We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Schema:
scalar LocalDate schema { query: Query } type Query { birthdaysScalar(dateOfBirth: LocalDate!): [Person]! birthdaysType(dateOfBirth: DateOfBirth!): [Person]! } input DateOfBirth { date: LocalDate! } type Person { name: String! dateOfBirth: LocalDate! }
Code for the request:
GraphQLRequestSerializer.OBJECT_MAPPER .registerModule(new JavaTimeModule()) .disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); PersonResponseProjection projection = new PersonResponseProjection().name(); BirthdaysScalarQueryRequest birthdaysScalarQueryRequest = BirthdaysScalarQueryRequest.builder() .setDateOfBirth(LocalDate.now()) .build(); BirthdaysTypeQueryRequest birthdaysTypeQueryRequest = BirthdaysTypeQueryRequest.builder() .setDateOfBirth(DateOfBirth.builder().setDate(LocalDate.now()).build()) .build(); GraphQLRequest requestScalar = new GraphQLRequest(birthdaysScalarQueryRequest, projection); GraphQLRequest requestType = new GraphQLRequest(birthdaysTypeQueryRequest, projection); System.out.println("Using Scalar: " + requestScalar.toHttpJsonBody()); System.out.println("Using Type: " + requestType.toHttpJsonBody());
Output:
Using Scalar: {"query":"query { birthdaysScalar: birthdaysScalar(dateOfBirth: 2020-12-29){ name } }"} Using Type: {"query":"query { birthdaysType: birthdaysType(dateOfBirth: { date: \"2020-12-29\" }){ name } }"}
Originally posted by @idegroot in #464 (reply in thread)
The text was updated successfully, but these errors were encountered:
Support custom serialization of parameters in GraphQLOperationRequest #…
37d6339
…472
5de7c0a
…472 (#473)
Kotlin, Scala: Support custom serialization of parameters in GraphQLO…
dc5b277
…perationRequest #472 * Support custom serialization of parameters in GraphQLOperationRequest #472 * #473 * #473 Co-authored-by: Bogdan Kobylynskyi <92bogdan@gmail.com>
kobylynskyi
Successfully merging a pull request may close this issue.
Schema:
Code for the request:
Output:
Originally posted by @idegroot in #464 (reply in thread)
The text was updated successfully, but these errors were encountered: