hasura / hasura/graphql-engine
Hasura doesn't find custom type declared in a schema other than public
- Dominant language
- TypeScript
- Stars
- 32.1k
- Forks
- 3k
- PR merge metrics
- PR metrics pending
Description
When declaring a custom type in hasura in a schema other than `public` and trying to use it on a column, it's not being listed as column type, we can get past that by declaring the column using the SQL tool in data but then when trying to filter based on that column i keep getting a `constraint-error`
## for example
let's say i have the schema `interview` and i declare the following custom type
`create type interview.status_type as enum('pending', 'disqualified');`
and then i use the declared type in another sql statement creating a column
`alter table interview.person_interviews add column status interview.status_type not null default 'pending'`
and then say i were to run the following graphql query
```
{
interview_person_interviews(where: {status: {_eq: "pending"}}) {
id
}
}
```
after running the above query i get the following error
```
{
"errors": [
{
"extensions": {
"path": "$",
"code": "constraint-error"
},
"message": "type \"status_type\" does not exist"
}
]
}
```
Contributor guide
Assessment
This issue has not been assessed yet.