- Notifications
You must be signed in to change notification settings - Fork 174
Bump to graphql-java 8.0 #130
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
Bump to graphql-java 8.0 #130
Conversation
| val scalars = scalarDefinitions.filter { !ScalarInfo.STANDARD_SCALAR_DEFINITIONS.containsKey(it.name) }.map { definition -> | ||
| val provided = scalars[definition.name] ?: throw SchemaClassScannerError("Expected a user-defined GraphQL scalar type with name '${definition.name}' but found none!") | ||
| GraphQLScalarType(provided.name, SchemaParser.getDocumentation(definition) ?: provided.description, provided.coercing, definition) | ||
| GraphQLScalarType(provided.name, SchemaParser.getDocumentation(definition) ?: provided.description, provided.coercing, ArrayList<GraphQLDirective>(), definition) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added an emptyList. The new builder part of GraphQLScalarType did not allow Coercing coercing to be set. Have used the only constructor that allows me to pass the args required. With this in mind I have had to pass an empty list ArrayList<GraphQLDirective>(), as it cannot be null.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you mind changing this to listOf()?
| | ||
| then: | ||
| returnedItem.id == 1 | ||
| returnedItem.get("onItemCreated").id == 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not 100% sure if this is correct.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What prompted the change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
returnedItem.id was null and of course the junit failed as it returns a map. I am not sure if it is due to a change I have made, that is now returns a map.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@apottere - are you happy enough with this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dug into this - it looks like the reason the behavior change was due to this change in graphql-java:
graphql-java/graphql-java@adcd3f7#diff-83f68d2746cff37c74d371d07db0e53b
"This commit adds the root field to subscription results to conform to
the current version of the GraphQL specification."
So it's an expected change to be spec compliant.
2aba06e to 26256b8 Compare | Can this be merged? |
| Any update on this? |
| Update? 😀 |
| Is there any way i can use this before it is merged to master? We really need it for our project. 😁 |
| @esovan If you already have an internal maven repository, you can simply fork the project and push the maven artifact to your repository. You can then use this artifact just like you used the official artifacts. If none of that sounds familiar, you can get away with just building the library locally and including the jar in your project. But it's probably a good investment to figure out how to do your own library builds properly. |
| @filipncs Yes, i was planning on doing so if no other solution was suggested 😁 thanks though 😃 |
| Sorry for the delay on this, it's syncing to central as |
Upgrading graphql-java to version 8.0.
Note junit had to be changed
EndToEndSpec.groovy. Not 100% sure if this is correct, please review.