graphql-editor / graphql-zeus

GraphQL client and GraphQL code generator with GraphQL autocomplete library generation ⚡⚡⚡ for browser,nodejs and react native ( apollo compatible )
https://graphqleditor.com/docs/tools/zeus/index/
MIT License
1.94k stars 105 forks source link

BigInt's not correctly being queried #385

Closed lukepolo closed 11 months ago

lukepolo commented 11 months ago
return await this.getClient()("query", {
      scalars: {
        uuid: {
          decode: (value: string) => {
            return value;
          },
        },
        bigint: {
          decode: (value: bigint) => {
            logger.info("DECODE", {
              real: BigInt("76561197960500905"),
              org: value,
              bi: BigInt(value),
              str: value.toString()
            } )
            // return value.toString();
          },
        },
      },
    })(gql);
outputs

```
{

real: 76561197960500905n, org: 76561197960500910, bi: 76561197960500912n, str: '76561197960500910' }



The value in the db is a prop int8 with a value of "76561197960500905"
lukepolo commented 11 months ago

my graphql engine didnt return as a string so it failed