-
Notifications
You must be signed in to change notification settings - Fork 162
Escape relationship type strings #2955
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
Escape relationship type strings #2955
Conversation
🦋 Changeset detectedLatest commit: 2453604 The changes in this PR will be included in the next version bump. 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 |
Performance ReportNo Performance Changes Show Full Table
Old Schema Generation: 41.218s |
|
So, a couple of extra things we'll need here:
But I think this is a nice and clean enough solution until we improve schema generation! |
| callbacks?: Neo4jGraphQLCallbacks; | ||
| customResolvers?: IResolvers | Array<IResolvers>; | ||
| }) { | ||
| }): ObjectFields { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can also remove the cast at the end now (as ObjectFields), right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sadly not since it is potentially undefined due to obj.fields being potentially undefined.
|
|
||
| const direction = directionArg.value.value as "IN" | "OUT"; | ||
| const type = typeArg.value.value; | ||
| const type = `\`${typeArg.value.value}\``; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can Cypher.utils.escapeLabel not be used here? I think this is the source of truth at the moment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, that's nice, thanks!
darrellwarde
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Outside of the code, just a couple of comments!
Co-authored-by: Darrell Warde <[email protected]>
Co-authored-by: Darrell Warde <[email protected]>
darrellwarde
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, nice changes!
Description
This PR adds escaping to relationship type strings.
There is a need for an unescaped version of the relationship type string so this is added as a new property
typeUnescapedThis PR also includes some small type and typo fixes that were in the periphery :)
Complexity
Low