Graphback: Integrate graphql-query-mapper into graphback queries

Created on 26 Feb 2020  路  7Comments  路  Source: aerogear/graphback

When making queries we always select all data which is no efficient.
We can use graphql-query-mapper library to see what kind of data was requested and map it directly in our API.

Targets

  • Eliminate select * from all queries.
  • Add a way to integrate query-mapper - selectionSet into context so CRUD layer can detect it and act on it.

Stretch Goals

  • Knex doesn't seem to be generic to be able to implement all crud methods and swap databases. There are differences which means that we will need to implement each db directly. Instead of using knex we can rely on actual db drivers which will allow us to get better insights into performance and consistency handlers

All 7 comments

Target here is to avoid * when doing selects. We can use some parts of the query mapper to get actual fields.

This is something I'll be willing to give a try at some point.

WDYT? @wtrocki @craicoverflow

Yes. This can be perfect issue to grab

This is something I'll be willing to give a try at some point.

Yep, this would be great to have.

We need that for 0.14.0 (specifically we want to execute total count only when a client requests it.

See

findComment{
     count
}

Bumping this. WE need that for 0.14.0

Was this page helpful?
0 / 5 - 0 ratings