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

Directives being dropped #13

Open
AndreaCrotti opened this issue Sep 9, 2024 · 2 comments
Open

Directives being dropped #13

AndreaCrotti opened this issue Sep 9, 2024 · 2 comments

Comments

@AndreaCrotti
Copy link

I was using the ta/edn2sdl function to convert back some edn files to graphql, and I noticed that all the directives have been dropped.

I think the issue is that I'm using the edn format exported by lacinia (which I thought this library was also based on), but this library expects a slightly different format looking at the tests.

I get for example this format

:cardCompanies
{:type (non-null (list (non-null :CardCompany))),
 :description "카드사 전체 조회 쿼리",
 :directives
 [{:directive-type :deprecated,
   :directive-args {:reason "deprecated"}}]},

But it looks like that this library expects this format:

:cardCompanies {:description "카드사 전체 조회 쿼리"
                :deprecated  "deprecated"
                :args        {}
                :type        (non-null (list (non-null :CardCompany)))
                :resolve     'farmmorning.core-api.payment.resolver/resolve-card-companies}

is there anything I'm missing maybe, how do I get that particular format?

@namenu
Copy link
Member

namenu commented Sep 9, 2024

Currently, tools.graphql does not support custom directives.
There are plans to implement them, but we're getting lazy because there are no directives other than deprecated in our use.

@AndreaCrotti
Copy link
Author

Ah right ok that's fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants