graphql

anish 2019-03-01T05:19:30.004200Z

Hi all

anish 2019-03-01T05:20:16.005Z

I'm using lacinia-pedestal on server and re-graph on client

anish 2019-03-01T05:21:04.005500Z

however while connecting from client I'm getting following error message xhrio.js:627 OPTIONS <http://localhost:8888/graphql> 404 (Not Found)

anish 2019-03-01T05:21:24.005900Z

my client code to connect server

anish 2019-03-01T05:21:55.006Z

anish 2019-03-01T05:22:24.006600Z

But i query using curl it works

anish 2019-03-01T05:22:39.006700Z

anish 2019-03-01T05:28:43.007200Z

i also see cors errors

anish 2019-03-01T12:56:52.008200Z

Now i have added cors in the server and added headers in client but still getting error Failed to parse GraphQL query

anish 2019-03-01T12:57:17.008300Z

raul.guajardo 2019-03-01T18:03:04.012Z

Currently I am working on sending mock data to the front end for consumption using graphql, but I want to validate the data before having it available for consumption using the provided graphql schema. How do you hook up graphql schema with specs to validate?

2019-03-01T19:10:08.013300Z

@raul.guajardo did you check: https://github.com/paren-com/serene i think it's exactly what you need.

raul.guajardo 2019-03-01T19:11:13.014Z

oh, I forgot to put, no third part libraries in the post

2019-03-01T19:11:28.014300Z

😄

domkm 2019-03-01T19:44:46.017400Z

If licensing is a concern, Serene is EPL (same as Clojure). If licensing is not a concern, what kind of solution were you thinking of if not a library?

raul.guajardo 2019-03-01T20:40:58.020100Z

I think I figured it out, it was mostly constraints in regards to the project, we want to be minimal with the amount of third party libraries we consume. I was overthinking the kind of tests required in this case. I wanted to validate the data completely(to be thorough), but after discussion we decided we just need to check if the keys specified in the schema exist in the mocked data. Thanks though 😄