hasura / hasura/graphql-engine

Variables support Standard Type mappings

Open
#9,836 0 comments 0 reactions 0 assignees View on GitHub
k/enhancement
Dominant language
TypeScript
Stars
32.1k
Forks
3k
PR merge metrics
PR metrics pending

Description

### Is your proposal related to a problem?

Currently i try to build a GraphQL Query.
```graphql
query ($filter_val_0:Int!) {
test_test (
limit: 20
order_by: {year: desc, month: desc, id: desc}
where: { year: { _eq: $filter_val_0 } }
) {
id
test
month
year
}
}
```

I now get an error:
```
variable 'filter_val_0' is declared as 'Int!', but used where 'smallint' is expected
```

### Describe the solution you'd like

I think it's more of a hindrance to be so penny-pinching with the guy.
These should also generally be more standardised here:

https://graphql.org/learn/schema/

The developer on the other hand does not necessarily need to know whether a smallint or a bigint is used for the database.

Furthermore, an int may be compared with a bigint or smallint. Also at database level.

### Describe alternatives you've considered

A settings option to change this behaviour.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.