Skip to content

Document custom type resolution strategies #334

Closed
@bclozel

Description

@bclozel

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.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions