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

Relay compiler doesn't show code excerpt when there is only one error #3318

Closed
andrehsu opened this issue Jan 12, 2021 · 0 comments
Closed

Comments

@andrehsu
Copy link
Contributor

andrehsu commented Jan 12, 2021

When there are two errors, relay-compiler shows the code excerpt

ERROR:
Encountered 2 errors:
- Unknown argument 'emailId' on field 'setEmailPrimary' of type 'Mutation'.

  components/Emails/EmailList.tsx:3:29
  2 |         mutation EmailList_setPrimaryEmailMutation($emailId:String!){
  3 |             setEmailPrimary(emailId: $emailId){
    |                             ^
  4 |                 emailId
- Unknown argument 'emailAddress' on field 'addEmail' of type 'Mutation'.

  components/Emails/Emails.tsx:3:22
  2 |         mutation EmailsAddEmailMutation($emailAddress:String!, $userId:String!) {
  3 |             addEmail(emailAddress: $emailAddress, userId:$userId){
    |                      ^
  4 |                 emailId

When there is only one, it doesn't show the excerpt

ERROR:
Unknown argument 'emailAddress' on field 'addEmail' of type 'Mutation'.

The second form isn't really helpful since it doesn't tell me which mutation/query is causing the issue, nor which file the error is located in.

Relay version 10.1.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant