Closed
Description
WithMetadata Modifier
When wrapped a WithMetadata Modifier, a scalar field can have an optional
selection underneath it. When a selection is present, the value field holds
the scalar, when a selection is not present, the scalar is returned.
Example:
const NameType = new WithMetadata(GraphQLString, new GraphQLObjectType({
name: 'Name',
fields: () => ({
firstName: { type: GraphQLString },
middleName: { type: GraphQLString },
lastName: { type: GraphQLString },
nickname: { type: GraphQLString }
})
}))
Or in graphql:
type Name: String {
firstName: String
middleName: String
lastName: String
nickname: String
}
Not sure if #914 helps to make this possible, would love to hear everyone's thoughts.
Metadata
Metadata
Assignees
Labels
No labels