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

Document custom type resolution strategies #334

Closed
bclozel opened this issue Mar 17, 2022 · 0 comments
Closed

Document custom type resolution strategies #334

bclozel opened this issue Mar 17, 2022 · 0 comments
Assignees
Labels
type: documentation A documentation task
Milestone

Comments

@bclozel
Copy link
Member

bclozel commented Mar 17, 2022

Spring GraphQL provides a default type resolver that uses simple class names to map from Java types to schema types.
As discussed with developers, some teams would like to have a consistent naming strategy and apply suffixes to Java class names:

type Product {
    sku: ID!
}

type Address {
    streetName: String
}

The corresponding Java classes would be ProductGraphQlResponse and AddressGraphQlResponse - a common suffix applied to all classes used as GraphQl types.

This issue is about documenting how to configure a custom ClassNameTypeResolver on the GraphQlSource so that it's achieving that naming strategy with a name extractor.

@bclozel bclozel added the type: documentation A documentation task label Mar 17, 2022
@bclozel bclozel added this to the 1.0.0-M6 milestone Mar 17, 2022
@bclozel bclozel self-assigned this Mar 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: documentation A documentation task
Projects
None yet
Development

No branches or pull requests

1 participant