-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[relay-compiler 13] The root of subscription must be a simple selection #3703
Comments
This is an accidental regression. We need this for an internal purpose (I think logging the subscription name or something), but the validation shouldn't happen in OSS code. We'll move this to private extensions. |
Summary: Fix for #3703 - These two transforms are fb-specific, they are used when `fb_only` feature is enabled (and this is ON for fb-specific build) - OSS `relay-compiler` doesn't have this feature Reviewed By: kassens Differential Revision: D33341463 fbshipit-source-id: 3d18c70ed5ed40943e1cb2c7c52d62cd715e7edb
This should be fixed with |
@alunyov This issue was closed, but it remains for me. It is not working with newest v13 neither |
Hey @artola can you provide more details here? Are you seeing the same error message? |
@alunyov I confirm the same error reported above.
Same result for: This produces the error: type Subscription {
countdown(from: Int!): Int
} graphql`
subscription demo4Subscription($from: Int!) {
countdown(from: $from)
}
` While this works: type Countdown {
current: Int!
}
type Subscription {
countdown(from: Int!): Countdown
} graphql`
subscription demo4Subscription($from: Int!) {
countdown(from: $from) {
current
}
}
` |
Hmm, this is strange. Let me reopen this to double-check. |
Reporting issues with Relay
Given schema
And App.tsx
I get this error: [ERROR] ✖︎ The root of subscription 'App_Subscription' must be a simple selection.
It seems like the subscription result needs to be an object. However, returning simple scalars worked in older versions. Is this a breaking change/intended way to use subscriptions?
The text was updated successfully, but these errors were encountered: