question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Console: Invalid error shown for multiple top level fields in subscription

See original GitHub issue

The following query shows an error in the GraphiQL console “Subscription xyz must select only one top level field”.

subscription xyz {
  abc { id },
  pqr { id }
}

However, the query works fine when executed.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
coco98commented, Nov 3, 2018

@hrj Unfortunately, multiple top level fields are not a part of the GraphQL subscription spec: https://facebook.github.io/graphql/draft/#sec-Single-root-field

1reaction
calvinlcommented, Aug 29, 2019

Commenting here - I have a need to retrieve the total count of a particular query, but also provide pagination using limit and offset. With a normal query I can simply remove the offset/limit portion of the arguments, but with I’ve found that aggregate.count will return the total count constrained to the limit that’s set - is there a way to accomplish this with limiting queries but still return the total count of the full query?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error handling - Apollo GraphQL Docs
The GraphQL operation includes an invalid value for a field argument. ... In the examples below, we use top-level await calls to start...
Read more >
Top GraphQL Errors and How to fix them
Top GraphQL Errors and How to Fix them. Error handling in GraphQL is different on both server and client side tooling.
Read more >
Troubleshoot Subscriptions - Tableau Help
If you receive a subscription with this error message, there could be several reasons: Missing credentials: Some views are published with embedded ...
Read more >
Resolve template validation or template format errors in ...
I receive an error message when I try to create my AWS CloudFormation ... For "Invalid template property or properties [XXXXXXXX]" errors, ...
Read more >
Common errors | Content API for Shopping - Google Developers
[link] validation/invalid_value for <destinations> : URLs do not belong to your website. quota/too_many_items: Merchant quota exceeded. The ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found