aws / aws/aws-appsync-community

Errors do not respect the June2018 specs

Open
#71 10 comments 26 reactions 0 assignees View on GitHub
feature-request
Dominant language
HTML
Stars
507
Forks
37
PR merge metrics
No merged PRs in 30d

Description

Since the June 2008 specs, [*Errors*](https://graphql.github.io/graphql-spec/June2018/#sec-Errors) adds the `extensions` entry. It also discourages the usage of any other additional entries.

> GraphQL services should not provide any additional entries to the error format since they could conflict with additional entries that may be added in future versions of this specification.

AppSync should honor those specs and drop the `data`, `errorInfo` and `errorType` entries from the errors. Instead, it should implement the `extensions` one.

`$util.error` should probably become `$util.error(String)` and `$util.error(String, Object)`

Where the first argument is the message string, and the second an optional `extensions` map.

Contributor guide

Open the contributing guide

Research direction

Start with the June 2018 GraphQL Errors specification linked in the issue, then review the documented $util.error usage. Done means AppSync errors omit data, errorInfo, and errorType, support an extensions entry, and expose the proposed one- and two-argument error forms.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.