Protean-Labs / mesh

The Mesh Engine that implements the Mesh Language, a computational language for web3.
Apache License 2.0
1 stars 0 forks source link

Fix GraphQL typing bug #87

Open cvauclair opened 3 years ago

cvauclair commented 3 years ago

Eval: -Fix bug where, due to different ordering of record fields between a GraphQL query's type signature and its response data, the function gql_to_value would raise an exception (closes #84)

cvauclair commented 3 years ago

@ThierryBleau can you try this branch with your previous queries to confirm that the bug is fixed?

ThierryBleau commented 3 years ago

I just need to build and replace the kernel spec right?

ThierryBleau commented 3 years ago

Still doesnt work for this one

Graphql.execute(```graphql(https://api.thegraph.com/subgraphs/name/convex-community/convex-votium)
      query {
        bribes {
            id
            epoch {
                id
            }
            token
            amount
        }
    }
```);
cvauclair commented 3 years ago

The issue with the Convex query seems to come from the Graphql_ppx (which we use to validate a query against a schema); the following exception is thrown: Graphql_ppx_base__Option.Option_unwrap_error("Cannot read config")

@ThierryBleau can you test more subgraphs to see if this is isolated to the Convex subgrpah or not? If it is, then I think the bug is not as critical and we can merge, but if it is widespread, then I'll have to do more digging

ThierryBleau commented 3 years ago

There is also this one

Graphql.execute(```graphql(https://api.thegraph.com/subgraphs/name/drondin/olympus-graph)
      query {
        dailyBonds(orderBy: timestamp, orderDirection: desc) {
            amount
            timestamp
            amount
            token {
              id
            }
        }
      }
```);