LowercaseString scalar type for GraphQL.js.
Usage
This package exports a LowercaseString scalar GraphQL.js type which is useful for ensuring a field has no uppercase characters e.g a username.
;
Programmatically-constructed schemas
The type can be used in a programmatically constructed schema:
;; ;
graphql-tools
SDL withWhen using the SDL with graphql-tools, define GraphQLLowercaseString
as the resolver for
the corresponding scalar type in the schema:
;; const typeDefs = `scalar LowercaseString type MyType { myField: LowercaseString}`; const resolvers = LowercaseString: GraphQLLowercaseString; typeDefs resolvers ;
Related
This project was inspired by graphql-type-json