facebook / facebook/relay

Unable to use @deleteRecord on field of type ID!

Open
#3,143 3 comments 4 reactions 0 assignees View on GitHub
wontfix
Dominant language
Rust
Stars
19k
Forks
1.9k
PR merge metrics
No merged PRs in 30d

Description

When I try to do the following mutation:

```
const deleteMutation = graphql`
mutation EventSettingsDeleteMutation($input: DeleteEventInput!) {
deleteEvent(input: $input) {
deletedEventId @deleteRecord
}
}
`;
```

For the scheme:

```
type DeleteEventPayload {
deletedEventId: ID!
}
```

I get following when running relay-compiler:

```
ERROR:
Invalid use of @deleteRecord on field 'deletedEventId'. Expected field type ID, got ID!.

Source: js/Manager/Events/Event/EventSettings.tsx (4:22)
3: deleteEvent(input: $input) {
4: deletedEventId @deleteRecord
^
5: }
```

Is this intended?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.