How to use the webiny-model.BooleanAttribute function in webiny-model

To help you get started, we’ve selected a few webiny-model examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github webiny / webiny-js / packages / webiny-api / src / attributes / convertToGraphQL.js View on Github external
export default (params: AttributeToTypeParams) => {
    const { attr, schema, convertModelToType } = params;

    let type = null;
    let resolve = null;

    if (attr instanceof BufferAttribute) {
        type = GraphQLString;
    }

    if (attr instanceof attrs.CharAttribute) {
        type = GraphQLString;
    }

    if (attr instanceof attrs.BooleanAttribute) {
        type = GraphQLBoolean;
    }

    if (attr instanceof attrs.IntegerAttribute) {
        type = GraphQLInt;
    }

    if (attr instanceof attrs.FloatAttribute) {
        type = GraphQLFloat;
    }

    if (attr instanceof attrs.ArrayAttribute) {
        type = new GraphQLList(GraphQLJSON);
    }

    if (attr instanceof attrs.ObjectAttribute) {