stvkoch / graphqlizejs

Generate data types and resolvers from models of sequelizejs
MIT License
9 stars 3 forks source link

[schema] Generate object schema structure, before generate the schema. #23

Open stvkoch opened 3 years ago

stvkoch commented 3 years ago

Before the start generate the schema, build an object structure, test it and generate the schema from this object instead of look direct over sequelize models.

{
   "scalars": [],
    "inputs": {},
    "types": {
        "Query": [],
        "Mutation": [],
        "Subscription": [],
        "category": [
            {
                "name": "id",
                "type": {
                    "name": "ID",
                    "allowNull": false,
                    "collection": false
                },
                "args": [
                    {
                        "name": "_where",
                        "type": {
                            "name": "_inputWhereId"
                        }
                    }
                ]
            }
        ]
    }