Skip to content
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

feat: Migrate to Spring-GraphQL #323

Merged
merged 7 commits into from
Jan 23, 2023
Merged

feat: Migrate to Spring-GraphQL #323

merged 7 commits into from
Jan 23, 2023

Conversation

saig0
Copy link
Contributor

@saig0 saig0 commented Jan 23, 2023

Description

✨ Replace previous GraphQL dependencies (com.graphql-java-kickstart) with the Spring GraphQL integration.

Migrate the GraphQL API:

  • Annotate all resolvers with @controller.
  • Annotate all query resolver methods with @QueryMapping.
  • Annotate all field resolver methods with @Schemamapping. The @SchemaMethod on the class doesn't work. And, the annotation on the methods without arguments doesn't work too. Maybe, it's because of some issues with Kotlin.

Dump Spring version from 2.6.7 to 2.7.8. The version update is required because the Spring GraphQL requires a version >= 2.7.x.

🔥 The new version of H2 (caused by the new version of Spring) doesn't work with the existing database schema because the columns key and value are reserved keywords. We need to change the column names to be compatible and update it to the new H2 version.

Dump the Java version from 11 to 17. The new Java version will be required for new Spring versions >= 3.x.


closes #134

Replace previous GraphQL dependencies with the Spring GraphQL integration.
Annotate all resolvers with @controller.

Annotate all query resolver methods with @QueryMapping.

Annotate all field resolver methods with @schemamapping. The @SchemaMethod on the class doesn't work. And, the annotation on the methods without arguments doesn't work too. Maybe, it's because of some issues with Kotlin.
The new version of H2 (caused by a newer version of Spring) doesn't work with the existing database schema because the columns `key` and `value` have a reserved key word. We need to change the column name to be compatible and update to the new H2 version.
GraphiQL is disabled by default. Let's enable it in the configuration.
@saig0 saig0 merged commit e160a79 into main Jan 23, 2023
@saig0 saig0 deleted the 134-spring-graphql branch January 23, 2023 05:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Evaluate other GraphQL framework
1 participant