I want to consume a GraphQL web API in .NET -


i want consume data graphql api. how can achieve that? new webapi , appreciated

assuming api want consume uses http, should able use curl, wget, charles, postman or url bar in browser make request.

to write first query, can start following:

query thenameofmyquery {  } 

now have named query, can start populating whatever fields graphql server exposing. blog example, might have this:

query thenameofmyquery {   posts {     title     author   } } 

now, turn can request, need url encode , add url. typical url looks this:

https://www.someserver.com/?query=...&variables=... 

so above example, have above query

https://www.someserver.com/?query=query%20thenameofmyquery%20%7b%0d%0a%20%20posts%20%7b%0d%0a%20%20%20%20title%0d%0a%20%20%20%20author%0d%0a%20%20%7d%0d%0a%7d 

some resources:


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -