graphql-type-any
v0.0.1
Published
Any scalar type for GraphQL.js
Downloads
1
Readme
GraphQL Any
An any type graphql-js.
Usage
$ yarn add graphql-type-any
Use it the same as any other scalar type, either input or output.
const Any = require('graphql-type-any');
const SomeType = new GraphQLObjectType({
name: 'SomeType',
fields: {
crazyField: {
type: Any,
// this would throw an error with the GraphQLInt
resolve: () => ({ goNuts: true, wtf: [1, 'two', [true, true, true]] }),
},
},
});
A word of warning. This stops schema validation (and all the type safety that comes along with it) in it's tracks. Use cautiously.