maxkomarychev / micronaut-graphql-kotlin-request-scope

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

dataloaders

This is an example repository showing problems of using @RequestScope with Micronaut and graphql-kotlin

TL;DR

  1. start the server
  2. run the query:
    query MyQuery {
      authors {
        id
      }
    }
  3. observe result returned
  4. change the query to:
    query MyQuery {
      books {
        id
        author {
          id
        }
      }
    }
  5. Observe: request fails with error Exception while fetching data (/books[1]/author) : No request present

Initial debugging shows problems with using @RequestScope when accessing calling field resolvers on >2 level of the query.

About


Languages

Language:Kotlin 100.0%