Skip to content

Schema directives support #77

@MichalLytek

Description

@MichalLytek

Partially solved by #369

Currently blocked by graphql/graphql-js#1343


Ability to define any arbitrary graphql directive to be passed to the compiled schema:

@ObjectType({ directives: ['@cacheControl(maxAge: 240)'] })
class SampleObject {
  // ...
}

Which should be equivalent to:

type SampleObject @cacheControl(maxAge: 240) {
  # ...
}

It might be also implemented as a separate decorator that would make possible to create custom decorators like @CacheControl({ maxAge: 240 }):

@Directive('@cacheControl(maxAge: 240)')
@ObjectType()
class SampleObject {
  // ...
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Blocked 🚫Resolving this issue is blocked by other issue or 3rd party stuffsDiscussion 💬Brainstorm about the ideaEnhancement 🆕New feature or request

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions