Comments (2)
While this is conceptually a feature that makes a lot of sense, there is some difficulty in implementing this nicely.
The generated builder methods take the appropriate Java type as input. E.g. an Int
input argument is represented by a builder method that takes an Integer
.
I'm not sure how we would best represent a variable in such cases. For a String input it's easy to imagine simply setting the value to $someInputVar
, but how would that work for other types?
FWIW, for these more complex queries, we've been recommending more and more to just specify them as a multi-line String in code, annotated with @Language("GraphQL")
. The generation of query builders was introduced before multi-line Strings were available in Java, which made it ugly to specify queries as Strings. However, that's no longer an issue.
Of course this means there is no compile time checks on queries, but the compiler would never guarantee correctness in any case, because the "client schema" might be outdated. You need tests to verify if the queries actually work.
from dgs-framework.
I have nothing to add, you said it all :)
We'll have to choose between benefiting from type checking at compile time and the performance offered by query caching.
from dgs-framework.
Related Issues (20)
- bug: dgsMicrometerContextRegistry's Slf4jThreadLocalAccessor conflicts with ObservationThreadLocalAccessor HOT 5
- bug: Switching to `graphql-dgs-spring-graphql-starter` breaks `Upload` GraphQL scalar HOT 3
- documentation: Incorrect Information in DGS Framework Documentation Regarding WebSocket Sub-Protocols HOT 2
- bug: unmapped fields after switching to Spring GraphQL integration HOT 5
- bug: "path" is not mapped from DataFetchingException to TypedGraphQLError HOT 1
- bug: scalar coercing exceptions don't use typed graphql error HOT 8
- bug: XML Injection (AKA Blind Xpath Injection) in ORG.XMLUNIT:XMLUNIT-CORE [CVE-2024-31573] HOT 2
- bug: Java Optional<> - Failed to convert from type LinkedHasMap<?, ?> to type HOT 4
- bug: OpenTelemetry Context is not getting propagated in the data loader HOT 6
- bug: dgs.graphql.path is not working in 8.7.1 & 9.0.0 versions with spring integration HOT 3
- bug: GraphQLJavaErrorInstrumentation changes error type of DataFetchingException HOT 3
- bug: Optional null fields are not returned HOT 5
- bug: DgsSpringGraphQLAutoConfiguration not compatible with WebFluxHateoasConfiguration HOT 1
- Custom ExecutionStrategy HOT 2
- Get request headers/ip inside ExecutionStrategy HOT 3
- feature: Need Cardinality Limiter for gql.loaderBatchSize tag in gql.dataLoader metrics HOT 4
- feature: Global Type Resolver
- bug:
- bug: Multiple data loaders found shown happens when handling requests
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dgs-framework.