tinacms / tina-graphql-gateway

Makes it easier to build TinaCMS websites with a GraphQL Layer.
https://tina.io/cloud
Apache License 2.0
6 stars 2 forks source link

bug: `unstable_defineSchema` Types not working #350

Closed logan-anderson closed 3 years ago

logan-anderson commented 3 years ago

Is there an existing issue for this?

Current Behavior

When using the number or text type an error occurs.

Expected Behavior

Number or text should not be in the types or should be supported

Steps To Reproduce

  1. somewhere in your schema.ts add this

    type: "number"

    or

    type: "text"
  2. When querieing the data you will get the following error

Error: Unable to fetch, errors: 
    Unknown field type number

or

Error: Unable to fetch, errors: 
    Unknown field type text

as a fix I did this

{
              type: "string",
              name: "heading",
              label: "heading",
              ui: {
                component: "number",
              },
 },

and to fix text I changed it to type: "string".

I would expect that the these types should be supported or they should not appear in the types of unstable_defineSchema

Environment

- Browser:
- OS: 
- Node: 
- npm:

Your Schema

No response

Your GraphQL Query

No response

Anything else?

No response