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

Remove branch that uses code removed in 2.0 #3979

Merged
merged 2 commits into from
Mar 12, 2022
Merged

Conversation

Tiedye
Copy link
Contributor

@Tiedye Tiedye commented Mar 9, 2022

BaseConnection was removed in 2.0 so that branch throws an error. Context is now required

BaseConnection was removed in 2.0 so that branch throws an error.  Context is now required
Copy link
Owner

@rmosolgo rmosolgo left a comment

Choose a reason for hiding this comment

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

Thanks for the update here! I just have one question about the change.

By the way, was this code giving you a warning in 1.13.x? (If not, I'll update 1.13 to warn in this case...)

Comment on lines 38 to 40
unless context.schema.new_connections?
raise ArgumentError, "No connections are defined for context.schema"
end
Copy link
Owner

Choose a reason for hiding this comment

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

I think this could only happen if someone set self.connections = nil in their schema definition. IMO we don't have to handle that case nicely (I've never seen it before), do you think it'd be ok to remove this? Or does it handle another situation I haven't thought of?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure about this case, I didn't want to remove the check that already existed! I'll remove it

@Tiedye
Copy link
Contributor Author

Tiedye commented Mar 10, 2022

By the way, was this code giving you a warning in 1.13.x? (If not, I'll update 1.13 to warn in this case...)

I don't believe it was.

For context we updated to 2.0.2 and this broke:

GraphQL::Relay::RangeAdd.new(
  collection: job.job_hidden_stage_links,
  item: link,
).edge

adding the context fixed it

@rmosolgo
Copy link
Owner

Thanks again for this fix -- I opened an issue to track that deprecation in 1.13.x 👍

@rmosolgo rmosolgo merged commit 8356ab5 into rmosolgo:master Mar 12, 2022
@rmosolgo rmosolgo added this to the 2.0.3 milestone Mar 12, 2022
@Tiedye Tiedye deleted the patch-1 branch March 14, 2022 14:29
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