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

fix: make generated list children non-nullable #1197

Merged

Conversation

saihaj
Copy link
Member

@saihaj saihaj commented Mar 20, 2023

This fixes the issue where the ABI -> GraphQL type was doing a simple 1:1 mapping where Array<Bytes> -> [Bytes] but for graph-node we require that list items are non-nullable so we need to make it Array<Bytes> -> [Bytes!]. I didn't want to introduce a big refactor so for now just making something that will work and accompanied test case. But we should revisit refactoring this logic.

closes #1058

@changeset-bot
Copy link

changeset-bot bot commented Mar 20, 2023

🦋 Changeset detected

Latest commit: a6a309d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@graphprotocol/graph-cli Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@theguild-bot
Copy link
Collaborator

theguild-bot commented Mar 20, 2023

🚀 Snapshot Release (alpha)

The latest changes of this PR are available as alpha on npm (based on the declared changesets):

Package Version Info
@graphprotocol/graph-cli 0.43.1-alpha-20230321033455-a6a309d npm ↗︎ unpkg ↗︎

Copy link
Collaborator

@dotansimha dotansimha left a comment

Choose a reason for hiding this comment

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

LGTM. @schmidsi @azf20 what do you think?

@saihaj saihaj merged commit b52e3b1 into main Mar 21, 2023
@saihaj saihaj deleted the saihaj/1058-generated-schema-has-lists-with-nullable-members branch March 21, 2023 12:26
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.

generated schema has List's with Nullable members
5 participants