fastgql icon indicating copy to clipboard operation
fastgql copied to clipboard

FastGQL first version roadmap

Open roneli opened this issue 4 years ago • 7 comments

Hello, fastGQL users, this is a basic roadmap to complete before releasing first version of fastgql.

  • [x] Support Full CRUD
    • [x] select support
    • [x] insert support #21
    • [x] delete support #22
    • [x] update support #34 #40
  • [x] Support Aggregate functions (max, sum, min, count) - didn't support sum yet #29
  • [x] Generation tests
  • [x] SQL builder tests #17
  • [ ] Cursor Pagination support
  • [x] Better docs (how to guides, adding custom scalars, custom operators, etc')
  • [x] Define better relation directives
  • [x] Code cleanup and documentation
    • [x] Logging for schema generation
    • [x] Cleanup schema package
    • [x] Move packages into internal/pkg. #33
    • [x] Support layout of schema based on original files #38
  • [ ] Multi Driver Support #40
    • [ ] Mongo
    • [x] SQL

if you have any suggestions or feature requests, you can add to this thread or open feature request issues depending on complexity/importance will add it to the roadmap

roneli avatar Dec 04 '21 12:12 roneli

@roneli Thanks, do you have any plan to have generator with some kind of popular orm such as https://gorm.io/? When we use an orm, all the relation (has one, has many, belong to...) are configured already. It is quite redundant to declare them again in the graphql schema

namnm avatar Dec 05 '21 22:12 namnm

Thanks, do you have any plan to have generator with some kind of popular orm such as https://gorm.io/? When we use an orm, all the relation (has one, has many, belong to...) are configured already. It is quite redundant to declare them again in the graphql schema

@namnm Yeah, I agree that it would be pretty handy. GORM is a useful tool not only because of its association support but also auto migration and much more. Unfortunately, fastGQL is currently based on the pgx, which as far as I know is incompatible with the generic sql.DB interface used in GORM. I would consider switching to it as it is supported in most orms/db oriented libs.

mpieczaba avatar Dec 06 '21 22:12 mpieczaba

@roneli Thanks, do you have any plan to have generator with some kind of popular orm such as https://gorm.io/? When we use an orm, all the relation (has one, has many, belong to...) are configured already. It is quite redundant to declare them again in the graphql schema

In general, GORM won't work well here, as it is inefficient in the query building and can't support injecting count aggregates, relational filters etc' easily I am sure it can be done, but it will require a lot of work and some workarounds.

The core idea of the fastGQL is to be a lightweight extension of gqlgen and allowing the user to supplement his gqlgen but also do this own thing + SDL approach which allows more control than DB schema approach.

roneli avatar Dec 07 '21 09:12 roneli

Thanks, guess we may need to create a fork from your repo to work with gorm.

namnm avatar Dec 08 '21 19:12 namnm

Thanks, guess we may need to create a fork from your repo to work with gorm.

@namnm Not really. I can work over the weekend on moving to the generic sql.DB interface and propose my solution to @roneli. Then he will decide what to do with it. If he accepts it, you would have opportunity to add GORM to your project like so. I will also try to make filter, sort and pagination queries reusable with different query executors. This feature would make fastGQL more extendable and allow to use this excellent tool not only with GORM but all sort of db oriented libs.

mpieczaba avatar Dec 08 '21 21:12 mpieczaba

If i understand correctly i don't need dataloader with this, right?

newbeelearn avatar Dec 17 '21 17:12 newbeelearn

If i understand correctly i don't need dataloader with this, right?

No you don't, it transforms the whole GraphQL query to an equiv SQL query. So all requested data is returned in one execution, and it just auto resolves from there. Obviously you can add more logical gqlgen stuff on top of it if you desire.

roneli avatar Dec 17 '21 18:12 roneli