Hi, thank you for the great library again.
I would like to propose a new API only, which is the inversion of skip.
The use case: We have a database table and GraphQL schema has "virtual" columns.
GraphQL:
type User {
id: ID!
firstName: String
lastName: String
fullName: String
}
Database:
- users:
- id
- firstName
- lastName
Resolver:
const UserResolver = {
lastName(root: User) {
return `${user.firstName} ${user.lastName}`
}
}
In this case, it would be really helpful if we have only
fieldsToList(info, {
only: ['id', 'firstName', 'lastName'],
})
If you are okay, I'll create a PR for this.
Thanks
Hi, thank you for the great library again.
I would like to propose a new API
only, which is the inversion ofskip.The use case: We have a database table and GraphQL schema has "virtual" columns.
GraphQL:
Database:
Resolver:
In this case, it would be really helpful if we have
onlyIf you are okay, I'll create a PR for this.
Thanks