Skip to content

Conversation

@angrykoala
Copy link
Member

Adds the documentation related to neo4j/graphql#6899

----

Note that the second positional argument, in this case `_args`, has a type of `Record<string, never>`, and as such it will always be an empty object.
Note that the second positional argument, in this case `_args`, has a type of `Record<string, never>`, and as such it will always be an empty object, this is to maintain a compatible signature with GraphQL resolvers.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Note that the second positional argument, in this case `_args`, has a type of `Record<string, never>`, and as such it will always be an empty object, this is to maintain a compatible signature with GraphQL resolvers.
Note that the second positional argument, in this case `_args`, has a type of `Record<string, never>`, and as such it is always an empty object.
This is to maintain a compatible signature with GraphQL resolvers.


**`populatedByOperation`**

The `context` argument contains the field `populatedByOperation`. This field is the mutation type that triggered the callback (`CREATE` or `UPDATE`). `populatedByOperation` allows for different logic to be executed depending on the type of operation. For example:
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
The `context` argument contains the field `populatedByOperation`. This field is the mutation type that triggered the callback (`CREATE` or `UPDATE`). `populatedByOperation` allows for different logic to be executed depending on the type of operation. For example:
The `context` argument contains the field `populatedByOperation`.
This field is the mutation type that triggered the callback (`CREATE` or `UPDATE`).
`populatedByOperation` allows for different logic to be executed depending on the type of operation.
For example:

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.

3 participants