KGraphQL icon indicating copy to clipboard operation
KGraphQL copied to clipboard

Nested Fragments fail with property does not exist

Open mdnorman opened this issue 6 years ago • 2 comments

mdnorman avatar Jan 17 '19 03:01 mdnorman

I've created a test that demonstrates this at https://github.com/mdnorman/KGraphQL/commit/d97189dee3b84099e30ddcb0b1229987c3471466

This query doesn't work, even though it should:

            {
                hero {
                    id
                    ...heroName
                }
            }

            fragment heroName on Hero {
                name {
                    real
                }
                ...heroNameDetails
            }

            fragment heroNameDetails on Hero {
                name {
                    asHero
                }
            }

These types of queries are built all the time with Relay (https://facebook.github.io/relay/)

mdnorman avatar Jan 17 '19 03:01 mdnorman

Submitted a PR: https://github.com/pgutkowski/KGraphQL/pull/51/files

mdnorman avatar Jan 17 '19 13:01 mdnorman