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

Detect directive argument changes #4277

Merged
merged 1 commit into from
Nov 4, 2024
Merged

Conversation

JoviDeCroock
Copy link
Member

Resolves #4237

This mirrors the fields/input-object argument logic but specifically for directives.

@JoviDeCroock JoviDeCroock requested a review from a team as a code owner November 1, 2024 10:00
Copy link

netlify bot commented Nov 1, 2024

Deploy Preview for compassionate-pike-271cb3 ready!

Name Link
🔨 Latest commit 756f929
🔍 Latest deploy log https://app.netlify.com/sites/compassionate-pike-271cb3/deploys/6724d0804aa2740008e655ff
😎 Deploy Preview https://deploy-preview-4277--compassionate-pike-271cb3.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

github-actions bot commented Nov 1, 2024

Hi @JoviDeCroock, I'm @github-actions bot happy to help you with this PR 👋

Supported commands

Please post this commands in separate comments and only one per comment:

  • @github-actions run-benchmark - Run benchmark comparing base and merge commits for this PR
  • @github-actions publish-pr-on-npm - Build package from this PR and publish it on NPM

@JoviDeCroock JoviDeCroock added the PR: feature 🚀 requires increase of "minor" version number label Nov 1, 2024
Copy link
Contributor

@yaacovCR yaacovCR left a comment

Choose a reason for hiding this comment

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

Questions:

  1. Directive arg change logic matches field arg change logic with respect to safe/dangerous/breaking if the directives are used in operations. Is that always true with respect to directives used to annotate schemas written in SDL?

  2. Not directly related to this PR, but => default argument removal seems to marked as dangerous, but it could be breaking if the argument is non-null (because it makes the argument Required from the operation perspective). This fact is not specific to directives, it's true for fields also, but I couldn't find the logic where this was handled for either directives or fields. Is this a separate bug?

@JoviDeCroock
Copy link
Member Author

  1. we also don't make the distinction between schema and document directives in the directive removed, we outright flag it as breaking. If we want to change that logic, we should also change it for removal of directives.

  2. yes, separate issue

@JoviDeCroock JoviDeCroock merged commit cca3f98 into main Nov 4, 2024
35 checks passed
@JoviDeCroock JoviDeCroock deleted the add-directive-argument-changes branch November 5, 2024 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: feature 🚀 requires increase of "minor" version number
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants