api-fu icon indicating copy to clipboard operation
api-fu copied to clipboard

Congratulations and questions.

Open frederikhors opened this issue 4 years ago • 2 comments

I just found out about your project. Incredibly gorgeous!

You have summarized in your Readme everything I have ever thought about GraphQL since I discovered it.

Two things:

  1. What do you think about creating a real-project demo repository that is not the usual VERY SIMPLE todo but something more complex? E.g. relations between entities, dataloaders; maybe without considering authentication because everyone has their own systems and this is not the task of this package.

  2. What do you think about gqlgen? The very convenient thing is the generation of the Go code starting from the GraphQL schema. The slowness of writing the code by hand is scary, what do you think about automatically generating the code?

Thanks again and again congratulations!

frederikhors avatar Nov 07 '20 18:11 frederikhors

Thank you for the kind words!

  1. In case you (or anyone that stumbles upon this issue) haven't already seen it, there is a demo application in the examples/chat directory. It's not as comprehensive as it could be though. I'm certainly open to making it more comprehensive, building out a more fleshed out project in another repo, or promoting any existing projects that use api-fu effectively!
  2. I think this is largely a matter of preference, but my experience is that it's generally easier for people to dive into a codebase with an API defined by code as all of the documentation they need is laid out in a familiar fashion via the Go docs. With gqlgen, there's a lot of magic that you have to learn about from their website. So while defining the schema as code certainly requires more code in some cases, I think being explicit about everything has a lot of merit. I do really envy the type-safety of gqlgen though. Maybe one day generics will save code-first GraphQL frameworks from interface{}.

ccbrown avatar Nov 07 '20 20:11 ccbrown

Ok.

I think we should start with a CRUD example with relations.

frederikhors avatar Nov 07 '20 20:11 frederikhors