Skip to content

Fragments on query level do not work #406

@stuebingerb

Description

@stuebingerb

According to https://spec.graphql.org/October2021/#example-fdbb7, fragments on Query level should work.

However, the following request

{
    film {
        id
    }
    ...film_title
}

fragment film_title on Query {
    film {
        title
    }
}

fails with

Key Query is missing in the map.
java.util.NoSuchElementException: Key Query is missing in the map.
	at kotlin.collections.MapsKt__MapWithDefaultKt.getOrImplicitDefaultNullable(MapWithDefault.kt:24)
	at kotlin.collections.MapsKt__MapsKt.getValue(Maps.kt:370)
	at com.apurebase.kgraphql.schema.structure.RequestInterpreter.createExecutionPlan(RequestInterpreter.kt:77)
	at com.apurebase.kgraphql.schema.DefaultSchema$execute$2.invokeSuspend(DefaultSchema.kt:57)
	at com.apurebase.kgraphql.schema.DefaultSchema$execute$2.invoke(DefaultSchema.kt)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions