-
Notifications
You must be signed in to change notification settings - Fork 249
Open
Description
Hi, i have a graphql server with a custom directive @auth, defined in multiple places, but in field loaders it isn't executed.
Example:
type Query {
client(id: ID): Client @auth(type: "system")
}
type Client {
id: ID
name(format: String): String @auth(type: "system")
payload: JSON @auth(type: "system")
users(cursor: String, perPage: Int) @auth(type: "system")
admins(cursor: String, perPage: Int) @auth(type: "admin")
}
Directive definition:
typedef: directive @auth (type: String) on OBJECT | FIELD_DEFINITION | SCHEMA
transformer:
mapSchema(schema, {
[MapperKind.TYPE]: ...,
[MapperKind.ROOT_OBJECT]: ...,
[MapperKind.OBJECT_FIELD]: ...
})
In client query and name and payload fields the directive works as expected, but in both users and admins (loaders), it isn't.
¿It's a framework limitation? ¿An implementation error? ¿A bug?
Thanks for the support! I have been working with Mercurius for 3 years ago and i'm really satisfied, it has all we need to create a fast lightweight graphql server!
nsinisterra
Metadata
Metadata
Assignees
Labels
No labels