-
Notifications
You must be signed in to change notification settings - Fork 55
Upgrade graphql-java version to 13.0 #209
New issue
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #209 +/- ##
===========================================
- Coverage 73.55% 73.5% -0.05%
- Complexity 850 863 +13
===========================================
Files 49 50 +1
Lines 3668 3722 +54
Branches 607 612 +5
===========================================
+ Hits 2698 2736 +38
- Misses 706 719 +13
- Partials 264 267 +3
Continue to review full report at Codecov.
|
f755275 to
0f4d46b
Compare
|
Thanks, this is mostly working for me. I'm having problems when merging with the schema generated by graphql-java-annotations though. The schema appears correct but the DataFetchers aren't executed. It looks like the schema merging code in I've confirmed that it works ok if I declare its GraphQLSchema as the primary Spring bean and so disabling the rest of the autoconfiguring and merging. Thanks |
|
@molexx Thanks! I will add support for code registry merge to enable merging different schemas via factory bean. Stay tuned... |
|
@igdianov as you mentioned in #205 adding the CodeRegistry to the SchemaFactory Bean would require changes in v0.3 not only v.0.4 One option would be, to add an additional GraphQLSchemaFactoryBean that extends the default one and adds support for the CodeRegistry. Imho this would only require some minor changes in the existing FactoryBean (mostly changing private to protected) and makes "back-porting" changes from 0.4 to 0.3 easier. |
|
@negesti @molexx Please, see the proposed support for handling merge of code registries in this commit: 77e8497 It should make it possible to do transparently when you want to instrument your schema with third party instrumentation tools or by hand. In my opinion, the code registry is a poorly designed feature that makes field to code bindings with static coordinates(type, field) instead of object tree. There is no validation of any kind in GraphQL, so you can make a mistake in coordinate names and add code binding to non-existing field for example. May be we should have validation to fail fast? |
|
Yes this works for me now, thanks! :-) |
|
RE validation, yes it would be good I think. There is validation elsewhere - non matching or duplicate types for instance - so it would be consistent. This functionality is creeping away from JPA. I wonder if it might make sense to split this out into a separate stitching library for graphql-java - and optionally Spring - that graphql-jpa-query-autoconfigure can depend on? |
706b7ab to
518b248
Compare
7ec278c to
67d2e55
Compare
* replace custom NullValue with graphql.language.NullValue (DataFetcher) Deprecated in 13.0 * Replace new GraphQLScalarType with newScalar Builder * use Field.transform to change arguments (all field properties are immutable) * replace DataFetchingEnvironmentBuilder with DataFetchingEnvironmentImpl (graphql internal class!) * variables have been moved from DataFetchingEnvironment.Environment directly to DataFetchingEnvironment.variables
in order to bridge changes in GraphQL-java 13
67d2e55 to
6a59e79
Compare
This PR is a fork from #205 that adds the following changes to original commit:
NullValue.Nullinstance