How does @notable directive work?

In the previous post, we have seen how @nomath directive works.

Now we will check the function of @notable directive.

  • When you declare a data type in the schema, Hypi automatically generates various input data types that are used to implement CRUD functions. And corresponding tables get created to store the data.
  • @notable will allow the input type to be generated but it won’t create the table that the data should be stored in. So you will not be able to create objects of that type.
  • @notable can be used in serverless and API gateway functions. Sometimes, if you integrate with an API, you may not want to create the table.
  • You’re charged for each table created. So,using @notable saves money

Declare below data type in the schema.

type XyzObj @notable {
    field: String
}

If you observe the schema, you can see all the data types associated with the XyzObj. But you will not be able to create an object. If you try to execute an upsert query, an error will pop up in the GraphQL Playground.