Gqlgen: [feature] - Separated Interface

Created on 29 Jul 2018  路  3Comments  路  Source: 99designs/gqlgen

As well as we know, its will generate a interface for whoole graphql system. its mean we need impl all method on single struct at single package. its not better design when we build a big graphql world.

I want to say:

A graphql endpoint is a graphql world. its included a lot modules, and those modules is very Independent. So, we need prepare a solution for impl graphql world on multi package.

In the background, I want to talking the Separated Interface feature.

Can you share any idea on there first ?

Most helpful comment

Is struct embedding enough?

type QueryResolver struct {
    sso.QueryResolver
    feed.QueryResolver
    user.QueryResolver
    etc.QueryResolver
}

All 3 comments

Is struct embedding enough?

type QueryResolver struct {
    sso.QueryResolver
    feed.QueryResolver
    user.QueryResolver
    etc.QueryResolver
}

Is struct embedding enough?

Yes, very nice feature!

@vektah yes, i think its very nice.

maybe we can pass a code gen argument for choose separated or all in one.

Was this page helpful?
0 / 5 - 0 ratings