GraphQL field ordering is _still_ not spec compliant

Open
#3,235 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
42/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
graphql, rust
Domain
api, backend

Research direction

Start in graphql/src/execution/execution.rs at lines 258-286, where fields are separated and reassembled. Run the example query from the issue and inspect how the response order is produced. Done means the response preserves the field order from the query, including placing _meta before things.

Written by the indexing model from the issue text.

Description

area/graphql bug

When running a query like { _meta { block { number } } things { id }} the response contains things first and _meta at the end. This is most likely because we pick fields apart here and then put them together without considering their ordering in the query.

Dominant language
Rust
Stars
3.2k
Forks
1.1k
Avg merge
4d 1h
Merged PRs (30d)
1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from graphprotocol/graph-node

All issues in graphprotocol/graph-node

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.