Namespacing and nested data-fetchers with federation-jvm

Hi,

So we’re attempting to resolve name-spaced queries with federation-jvm and can’t figure out how to structure the code to do this. Below is a simplified version of the schema we are using.

type ProductQueries {
    byId(id: ID!): Product
    list: Product
}

type Query {
    product: ProductQueries
}

The resultant query looks something like this:

query GetProductById($id: String) {
    product {
        byId($id) {
            id,
            name
        }
    }
}

With Apollo federation in the javascript world we simply define a resolver which returns an object with it’s own nested resolvers as such:

const resolvers = {
  Query: {
    product: () => ({
      byId: (id, {dataSources}) => {
        // Get the product
      }
    })
  },
  Product: {
    ....
  }
};

I’ve been playing around with this using the java federation-jvm library and can’t figure out how to resolve the query, any guidance or examples on how to do this would be much appreciated.