Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Congratulations and questions/proposals/fears #40

Open
frederikhors opened this issue Dec 3, 2020 · 3 comments
Open

Congratulations and questions/proposals/fears #40

frederikhors opened this issue Dec 3, 2020 · 3 comments
Labels
enhancement New feature or request question Further information is requested

Comments

@frederikhors
Copy link

Your work is amazing!

It feels like every line of code is sweaty. 😄

A huge thank you for all this.

In a few hours I want to start a project with this.

Issues

  1. Copying the code from the Readme for convert_plugin.go I have to write an additional argument for gbgen.NewConvertPlugin. What should I write there?

Proposals

  1. I undertake to write documentation for every single thing I learn, day after day: explanations that maybe those who created it take for granted, recipes for routine things etc.

  2. But we have to decide where to write them: one thing that doesn't steal more than 10 minutes of setup. A Gitbook on github pages?

Fears

  1. How to write business logic after all the generation?

    Example:

    If I'm creating a Player for a Team I wanna check if Team has enough "space" before (in a simple DB transaction).

    Is this eventuality considered? I think so, of course. I just don't know where to start. 😢

  2. Have you ever needed to use something for tenants in the DB?

    Something like https://github.com/influitive/apartment for Rails.

    Quite simply adding WHERE tenant_id = [ID] to each DB query and the same for insert/update/delete queries.

Thanks again for this huge huge huge work! 😄

@RichardLindhout
Copy link
Member

RichardLindhout commented Dec 3, 2020

Proposals

  1. Would be really nice
  2. I think perfect if it works with .md files

Fears

  1. The next step in this project to add option for custom resolvers and custom converts so we can re-generate without loosing the custom things. But I'm a little short on time.

e.g. if you have a function name UserToGraphql in your package and it's not in the default files we will generate UserToGraphqlOriginal which you can still use but your custom function is getting called.

Issue id: #7

  1. Yes but it's really stupid now since it's hardcoded automatically on userId and organizationId this needs to be customizable I only made it work for my own use case. It's also a requirement for security to add these field to every table out there + I need a solution for admin calls where the userId would need to be provided sometimes

Issue id: #18

I'm still working on releasing version 3 with Connections it's finished in development but still needs some documentation

@RichardLindhout
Copy link
Member

For now if I want to customize I add a different file e.g. resolver_custom.go with my custom logic and remove the generated resolver after generation.

@RichardLindhout RichardLindhout added enhancement New feature or request question Further information is requested labels Dec 4, 2020
@RichardLindhout
Copy link
Member

Tenants are configurable now in v3.1.1!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants