Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API for setting custom directives #916

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Commits on Oct 6, 2022

  1. API for setting custom directives

    Prototype for #913
    In this prototype, we check how we can apply custom directives much easier.
    Furthermore, we check if we can prove type safety, to that a custom directive
    that can be applied on some elements cannot be applied on others.
    
    Limitations:
    - a directive can be applied on a field definition for example. With that current approach,
    we cannot formulate that with the type system as a field definition lives in sangria.ast, and
    we only handle sangria.schema types.
    - we are introducing new types to mark on which elements a directive can be applied. Those types
    are kind of duplication of the current [sangria.schema.DirectiveLocation values](https://github.com/sangria-graphql/sangria/blob/f339b5df97bd89c2a24fcfc977a1f20191ffd7fc/modules/core/src/main/scala/sangria/schema/Schema.scala#L1136-L1158).
    yanns committed Oct 6, 2022
    Configuration menu
    Copy the full SHA
    955420d View commit details
    Browse the repository at this point in the history