Collection of custom GraphQL types like Email, URL, password and many more
npm install graphql-custom-types> This is a collection of custom GraphQL types that I tend to reuse quite often so I packed them into a module.
* GraphQLEmail
* GraphQLURL
* GraphQLDateTime
* GraphQLLimitedString(min, max, alphabet)
* GraphQLPassword(min, max, alphabet, complexity)
* GraphQLUUID
complexity default options:
``JavaScript`
{
alphaNumeric: false,
mixedCase: false,
specialChars: false
}
Bash
npm install graphql graphql-custom-types --save
`Usage
`JavaScript
import {
GraphQLEmail,
GraphQLURL,
GraphQLDateTime,
GraphQLLimitedString,
GraphQLPassword,
GraphQLUUID
} from 'graphql-custom-types';
`And use it in your Schema as you would use any other type.
Development
Contributions are very welcome, please feel free to submit a type. If you do so make sure there are test cases in place.$3
The test suite may be invoked by running:
`Bash
npm run test
``