WhatsApp-Clone-Tutorial icon indicating copy to clipboard operation
WhatsApp-Clone-Tutorial copied to clipboard

[Client Step 9.1]

Open killjoy2013 opened this issue 6 years ago • 4 comments

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

killjoy2013 avatar Aug 16 '19 12:08 killjoy2013

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

Urigo avatar Aug 27 '19 20:08 Urigo

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

killjoy2013 avatar Aug 29 '19 05:08 killjoy2013

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?

Urigo avatar Aug 29 '19 17:08 Urigo

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.

killjoy2013 avatar Apr 11 '20 18:04 killjoy2013