Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

where clause should allow for "blockNumber" property #554

Open
jellegerbrandy opened this issue Oct 27, 2020 · 0 comments
Open

where clause should allow for "blockNumber" property #554

jellegerbrandy opened this issue Oct 27, 2020 · 0 comments

Comments

@jellegerbrandy
Copy link
Contributor

jellegerbrandy commented Oct 27, 2020

The graph supports s block argument https://thegraph.com/docs/graphql-api#queries that we can use to get the state of the blockchain at a specific block.

this can be supported easily by adding a few lines for options.block in

export function createGraphQlQuery(options: ICommonQueryOptions, where: string = '') {

We need this for common, where we are using the 2.0.0-experimental build

While we are doing this, it would also be a good idea to have a more restrictive type on createGraphQLQuery() that limits the kind of argument you can pass - we did not catch this at first in our code because we could add the block argument without any type error or runtime error (it just skips the argument silently)

@jellegerbrandy jellegerbrandy changed the title where clause should allow for "block" property where clause should allow for "blockNumber" property Oct 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant