Make it possible to express 'query at latest block' with a block constraint

未关闭
#3,169 2 条评论 1 个 reaction 已指派 1 人 在 GitHub 查看

@saihaj 已经在做这个了。

开始于 2023年11月6日。

评估

这个 Issue 还没有评估数据。

描述

area/graphql enhancement

Queries can contain a block constraint like block: { number: 79 } to execute the query at block 79. It is not possible to express 'give me data for the latest block' with that constraint which forces apps that want to sometime query at a certain block, and sometimes at the latest block, to change the text of their GraphQL query.

We should make it possible to always include block: { number: $block } in a query, and have a special value that means 'latest block'. Using -1 as that special value would probably be best since some languages support negative array indexes to count from the back, where array[-1] means 'give me the last array entry'.

主要语言
Rust
星标
3.2k
派生
1.1k
平均合并
4 天 1 小时
30 天内合并 PR
1

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

graphprotocol/graph-node 的其他 Issue

查看 graphprotocol/graph-node 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。