[v2] Unknown fragment spread "..."
See original GitHub issueHi Jim,
I am getting a warning while try to use fragment in a query (which executes without any error):
fragment basicInfo on Bathroom {
name
slug
}
query {
bathrooms (pager: {
limit: 1,
type: NUMBER
}) {
nodes {
...basicInfo
}
}
}
But no error return after fetch data:
{
"data": {
"bathrooms": {
"nodes": [
{
"name": "1",
"slug": "1"
}
]
}
}
}
Details:
PhpStorm 2019.1 EAP
Build #PS-191.6014.13, built on March 6, 2019
PhpStorm EAP User
Expiration date: April 5, 2019
JRE: 1.8.0_202-release-1483-b31 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 8.1 6.3
---
JS GraphQL: v2.0.0-alpha-8
P.S. Please let me know if you need more details.
Thanks!
Issue Analytics
- State:
- Created 5 years ago
- Comments:16
Top Results From Across the Web
[v2] Unknown fragment spread "..." · Issue #218 - GitHub
Hi Jim, I am getting a warning while try to use fragment in a query (which executes without any error): fragment basicInfo on...
Read more >Fragments - Apollo GraphQL Docs
A GraphQL fragment is a piece of logic that can be shared between multiple queries and mutations. ... much like JavaScript spread syntax....
Read more >Fragments | Relay
Relay guide to rendering fragments. ... Fragments are reusable units in GraphQL that represent a set of data to query from a ......
Read more >Relay directives | Martin Zlámal
The @alias directive allows you to expose a spread fragment — either a named fragment spread or an inline fragment — as a...
Read more >Unleash the power of Fragments with GraphQL Codegen
gql' const Avatar_UserFragment = graphql(/* GraphQL */ ` fragment ... The other data declared through the additional fragment spread( ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@jahudka Have you tried the following:
This validates according to the GraphQL spec, and should be supported by the plugin.
The same
extends
approach is used by Apollo to add client fields to the Query type and other types: https://github.com/jimkyndemeyer/graphql-config-examples/blob/master/extend-client-fields-and-directives/client-schema-extensions.js@dandrei Yeah that’s the valid issue. When you split your schema into multiple files. This error always popup.
@jimkyndemeyer I am facing the same issue. Do you plan to fix this issue?
P.S. I am using the following library to split my schema into chunks (later combined on runtime): https://github.com/prisma/graphql-import