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 in options.graphql #29

Open
stmcodes opened this issue Apr 25, 2021 · 1 comment
Open

Directives in options.graphql #29

stmcodes opened this issue Apr 25, 2021 · 1 comment

Comments

@stmcodes
Copy link

stmcodes commented Apr 25, 2021

In your example
example/codegen/pb/options.graphql
There are the directives of the services

directive @Query on FIELD_DEFINITION
directive @Service on FIELD_DEFINITION
directive @Test on FIELD_DEFINITION

This is automatically added with your generator. But the individual serviceNames don't get the @service automatically or do they?
For Example in line 84
serviceMutate1(in: DataInput): Data @Service
Is there a reason of this directives in general? And would it be helpful for you to automatically add this Directives to the specific services?

@danielvladco
Copy link
Owner

Hi what do you mean by individual services and specific services?

This directive is added so you can more easy apply interceptors to endpoints (for example to add authentication)

If you don't need it you can disable it using svc=false parameter when generating code (check the example)

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