Open sbditto85 opened 4 years ago
Forgot to add my Cargo.toml
[package]
name = "juniper-example"
version = "0.2.0"
authors = ["pyros2097 <pyros2097@gmail.com>"]
workspace = ".."
edition = "2018"
[dependencies]
actix-cors = "0.2.0-alpha.3"
actix-web = "2.0.0-alpha.6"
actix-rt = "1.0.0"
env_logger = "0.7.1"
serde = "1.0.103"
serde_json = "1.0.44"
serde_derive = "1.0.103"
juniper = "0.14.1"
Using cargo tree (or just looking at the lock file) it shows using juniper 0.14.2 (current release on crates.io at time of report)
Describe the bug Errors that occur in a list of items do not have the index in the path.
To Reproduce Steps to reproduce the behavior: Building off the actix_web example I used this as my schema.rs
and this as my main.rs
when going to http://localhost:8080/graphiql and running the query:
I get the result:
Expected behavior I expected the path value of the error to contain the index of the "human" that couldn't return its name and as such is null, otherwise I don't know exactly which error maps to which place. In the graphql documentation for a similar example the error includes an index see https://graphql.github.io/graphql-spec/June2018/#example-90475.
Since in my example the query is returning a list of humans that internally have a list of humans it would expect a result like:
Note the paths now have indexes to indicate which item the error applies to in the path.