Closed changeling closed 5 years ago
I've worked around this issue by doing the following (this'll be long, apologies in advance):
const IntrospectionQuery = graphql`
query IntrospectionQuery {
__schema {
queryType {
name
}
mutationType {
name
}
subscriptionType {
name
}
types {
kind
name
description
fields(includeDeprecated: true) {
name
description
args {
name
description
type {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
}
}
}
}
}
}
}
}
defaultValue
}
type {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
}
}
}
}
}
}
}
}
isDeprecated
deprecationReason
}
inputFields {
name
description
type {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
}
}
}
}
}
}
}
}
defaultValue
}
interfaces {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
}
}
}
}
}
}
}
}
enumValues(includeDeprecated: true) {
name
description
isDeprecated
deprecationReason
}
possibleTypes {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
}
}
}
}
}
}
}
}
}
directives {
name
description
locations
args {
name
description
type {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
}
}
}
}
}
}
}
}
defaultValue
}
}
}
}
`
But yeah, Yay fragments!
Hey @changeling, Is this issue resolved for you now or is additional work necessary?
Thanks!
Hey, @rohit-ravikoti,
Has something changed in the code? I was able to work around it, as mentioned above, by explicitly stating the entire introspectionQuery, sans fragments, but would love to see it working as presented in https://github.com/Novvum/graphql-birdseye/blob/master/example/src/utils/introspectionQuery.tsx.
The last commit I see shows as 21 days ago
, so I haven't tried. Is there something changed that I'm missing?
Hey @changeling, No, there haven't been any changes since that last commit. That's really strange.
I used the entire query as a JSON import, which works fine, bypassing the use of introspectionQuery.tsx
. Is there something you'd like me to try to figure this out, or just let it go?
Please reopen if this becomes an issue.
Describe the bug
Using
BabelPluginRelay
, introspectionQuery.tsx yields the error:introspectionQuery.tsx
Maybe update to implement
createFragmentContainer()
syntax for fragments.To Reproduce Use declared introspection query with
babel-plugin-relay/macro
. Encounter above error.Expected behavior Not encountering above error.
Package
react
Additional context See: BabelPluginRelay Error in 4.0 and Breaking change
Caveat I'm just getting my feet wet with
React
, and it is entirely possible I'm completely misunderstanding what's going on here. ::cha-grin:: If that's the case, please gently slap me and move on with your day. :)