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

Replace shurcool Errors in GQLError #104

Merged
merged 1 commit into from
Feb 22, 2023
Merged

Replace shurcool Errors in GQLError #104

merged 1 commit into from
Feb 22, 2023

Conversation

samcoe
Copy link
Contributor

@samcoe samcoe commented Feb 15, 2023

Fixes #97

Note this is based on the v2 branch as I felt this also could be considered a breaking change and thought it belonged with the other changes that will go into v2. If we felt like making this a non-breaking change we could also allow the GQLError to actually Wrap/Unwrap the shurcool error we received.

@samcoe samcoe self-assigned this Feb 15, 2023
@samcoe samcoe changed the title Wrap shurcool Errors in GQLError Replace shurcool Errors in GQLError Feb 15, 2023
Type: e.Type,
}
}
err = &GQLError{items}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change could easily be backwards-compatible if GQLError implemented Unwrap() error that returned the original graphql.Errors instance

@samcoe samcoe merged commit 9ee669b into v2 Feb 22, 2023
@samcoe samcoe deleted the wrap-errors branch February 22, 2023 06:32
samcoe added a commit that referenced this pull request Mar 18, 2023
samcoe added a commit that referenced this pull request Mar 20, 2023
samcoe added a commit that referenced this pull request Apr 5, 2023
samcoe added a commit that referenced this pull request Apr 16, 2023
* Fix up repository package

* Refactor api package

* Fix up browser package

* Fix up config package

* Fix up template package

* Wrap shurcool Errors in GQLError (#104)

* Rename CurrentRepository to Current

* Fix up tests

* Change all references of GQL to GraphQL and references of gql to graphQL

* Update to Go 1.20

* Update package to V2

* Update README
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

Successfully merging this pull request may close these issues.

None yet

2 participants