2

Let's say someone has setup a GraphQL endpoint. I want send and consume GraphQL queries from within my Rails application, as opposed to using React and Relay.

Are there examples of this, or known gems or libraries?

4
  • if the endpoint is setup already, just send a regular ajax request with the graphql query in the body--that's the normal way of doing it. Commented Mar 8, 2016 at 16:20
  • Do you mean an ajax request from the browser via javascript? Commented Mar 8, 2016 at 16:29
  • 1
    Sorry I mean an http request.. either as ajax from the browser or from a rails controller... anywhere I mean. Commented Mar 8, 2016 at 16:48
  • Check this link for details: stackoverflow.com/questions/75821355/… Commented Feb 11 at 13:39

1 Answer 1

2

You can send an HTTP request to the GraphQL that's structured in the proper query structure as specified by the GraphQL specification: http://graphql.org/docs/queries/

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.