Gqlgen: Request: support `extend` feature

Created on 18 Jul 2018  路  2Comments  路  Source: 99designs/gqlgen

aka Extension.

our team's usecase is...

There is something I want to hide schema itself from users.
likes...

# public!
type User {
    id: ID
    name: String
    point: Int @requiredLogin
}
# confidential... What kind of information we have.
directive @hasRole on FIELD

enum Role {
    USER
    STAFF
    ADMIN
}

extend type User {
    creditScore: Int @hasRole(role: STAFF)
    loginHistories: [LoginHistory!]! @hasRole(role: ADMIN)
    relatedServices: [Service!]! @hasRole(role: ADMIN)
}

I am happy to have https://github.com/vektah/gqlgen/issues/6 , but I can handle without it.

Most helpful comment

Type extensions will work with the new parser

Hiding stuff from the introspection api though sounds interesting, we will make sure to take it into account in the directive planning.

All 2 comments

Type extensions will work with the new parser

Hiding stuff from the introspection api though sounds interesting, we will make sure to take it into account in the directive planning.

yay! SchemaExtension also seems to be useful too.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

JulienBreux picture JulienBreux  路  3Comments

theoks picture theoks  路  3Comments

huanghantao picture huanghantao  路  3Comments

andrewmunro picture andrewmunro  路  4Comments

cemremengu picture cemremengu  路  3Comments