Best way to implement namespace?
- Langage dominant
- Go
- Étoiles
- 10.8k
- Forks
- 1.3k
- Merge moyen
- 2 j 36 min
- PR mergées (30 j)
- 26
Description
### What happened?
Our graphql apis is expanding rapidly and we would like to start namespacing our operations as per
https://www.apollographql.com/docs/technotes/TN0012-namespacing-by-separation-of-concern/
### What did you expect?
A smooth developer experience without having to add lots of resolvers and complex.
Right now the number of resolvers and extra arguments needed to get this to work as well as gqlgen.yml or `@goField` tags in confusing to a lot of the engineers.
Maybe we could introduce another internal directive like the goField such as a `@namespace` that would allow for a better devex.
### Minimal graphql.schema and models to reproduce
Given an accounts service
```graphql
type Query {
accounts: AccountQueries!
}
type Mutation {
accounts: AccountMutations!
}
type AccountQueries {
getById(id: ID!): Account!
}
type AccountMutations {
create(input: AccountCreateInput!): Account!
}
type Account {
id: ID!
}
input AccountCreateInput {
email: String!
}
```
### versions
Not relevant
Guide de contribution
Ouvrir le guide de contribution
Évaluation
Cette issue n'a pas encore été évaluée.