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

Inject schema resources from spring-graphql into DgsSchemaProvider. #1779

Merged
merged 2 commits into from
Jan 15, 2024

Conversation

srinivasankavitha
Copy link
Contributor

Changes in this PR

Inject schema resources from spring-graphql into DgsSChemaResourceProvider so those can be parsed as well.

}
}

private fun computeSchema(schema: String? = null, fieldVisibility: GraphqlFieldVisibility): GraphQLSchema {
private fun computeSchema(schema: String? = null, schemaResources: Set<Resource>? = emptySet(), fieldVisibility: GraphqlFieldVisibility): GraphQLSchema {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor:

  1. Don't make it nullable - it can just be an empty set by default, so we don't have to null check.
  2. Make it the third argument. The existing fieldVisibility argument is non-optional. If this new one is the last argument and it has a default value, you don't have to specify it, so for example the DgsAutoConfiguration can stay unchanged.

@srinivasankavitha srinivasankavitha merged commit d9abd24 into spring-graphql-refactored Jan 15, 2024
3 checks passed
@srinivasankavitha srinivasankavitha deleted the add-schema-resources branch January 15, 2024 23:32
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.

2 participants