How to use the webiny-model.FloatAttribute 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
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) {
        type = GraphQLJSON;
    }

    if (attr instanceof ModelAttribute) {
        const model = attr.getModelInstance();
        type =
            schema.getType(model.classId) ||
            convertModelToType(model.classId, { type: "model" }, model.getAttributes(), schema);