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

Errors: add locations #156

Closed
ghostdogpr opened this issue Jan 6, 2020 · 1 comment
Closed

Errors: add locations #156

ghostdogpr opened this issue Jan 6, 2020 · 1 comment
Labels
enhancement New feature or request server Issue related to caliban server

Comments

@ghostdogpr
Copy link
Owner

Add support for the locations data for each error as defined in the GraphQL spec:

{
  "errors": [
    {
      "message": "Name for character with ID 1002 could not be fetched.",
      "locations": [ { "line": 6, "column": 7 } ],
      "path": [ "hero", "heroFriends", 1, "name" ],
      "extensions": {
        "code": "CAN_NOT_FETCH_BY_ID",
        "timestamp": "Fri Feb 9 14:33:09 UTC 2018"
      }
    }
  ]
}

This will require extracting the line and column information of each field when parsing queries.
See initial discussion in #140

@ghostdogpr
Copy link
Owner Author

Closed by #168

@ghostdogpr ghostdogpr added server Issue related to caliban server core labels Sep 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request server Issue related to caliban server
Projects
None yet
Development

No branches or pull requests

1 participant