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

Validate edgeTypeName argument points to an existing type #4621

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

tobias-tengler
Copy link
Contributor

@tobias-tengler tobias-tengler commented Feb 20, 2024

Currently you can input any string for the edgeTypeName argument on the @prependNode and @appendNode directives.

This change enforces that the value you supply points to an existing object type within the schema.

@tobias-tengler tobias-tengler force-pushed the validate-edge-type-name branch 3 times, most recently from 5030ac8 to 77dd653 Compare February 24, 2024 18:19
@captbaritone
Copy link
Contributor

So good! Thank you!

@facebook-github-bot
Copy link
Contributor

@captbaritone has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@captbaritone
Copy link
Contributor

Still working on landing this. It looks like it's triggering a number of errors internally. Trying to figure out if this is because we're catching real errors (and if so, how we can resolve them), or if there's something else going on here.

@tobias-tengler
Copy link
Contributor Author

Is this still blocked internally?

@captbaritone
Copy link
Contributor

Sorry, haven't been able to revisit. Adding to my todo list for next week.

@captbaritone
Copy link
Contributor

So we have many infractions in our codebaese today, and I don't see an obvious way to "fix" these issues at scale. Maybe we need a mechanism to selectively ignore this warning for existing infractions? Perhaps we could leverage our feature flag infra here?

Also, would be cool to suggest types with similar names in this error, I think we have examples of that elsewhere in the codebase.

@tobias-tengler
Copy link
Contributor Author

@captbaritone Added object type suggestions and a feature flag to disable the validation :)

@facebook-github-bot
Copy link
Contributor

@captbaritone has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@tobias-tengler
Copy link
Contributor Author

@captbaritone I fixed the conflicts :)

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

Successfully merging this pull request may close these issues.

None yet

3 participants