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

[Client Step 9.1] #26

Open
killjoy2013 opened this issue Aug 16, 2019 · 4 comments
Open

[Client Step 9.1] #26

killjoy2013 opened this issue Aug 16, 2019 · 4 comments

Comments

@killjoy2013
Copy link

Hi,
How can I add @client directive from client side schema?
Thanks

@Urigo
Copy link
Owner

Urigo commented Aug 27, 2019

@killjoy2013 can you give an example use case?
maybe we can add it to the tutorial script if it would be relevant

@killjoy2013
Copy link
Author

I could managed to add client side schema using client-schema.graphql file like below

directive @client(selected: Boolean) on FIELD

extend type NodeGType {
  selected: Boolean
}

extend type MainMutation {
  toggleSelectedNode(id: String!): String
}

extend type MainQuery {
  selectedNodes: [NodeGType]
}

Working well. However, It wasn't easy for me to find my way. If there was a chapter in the tutorial for 'Managing Clientside Schema' would be very helpful.
Thanks

@Urigo
Copy link
Owner

Urigo commented Aug 29, 2019

I would love to add a chapter about this.

Can you help me think about a feature we should add to WhatsApp that would use client side schema?

@killjoy2013
Copy link
Author

So sorry for this late reply!
I needed to create client side schema in my project. Code generator did it well. I believe, would be useful add a similar case in WhatsApp as well. I'll let you know about a sample use case.

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