Fork me on GitHub
#graphql
<
2019-03-01
>
anish05:03:16

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

anish05:03:04

however while connecting from client I'm getting following error message xhrio.js:627 OPTIONS 404 (Not Found)

anish05:03:24

my client code to connect server

anish05:03:24

But i query using curl it works

anish05:03:43

i also see cors errors

anish12:03:52

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

raul.guajardo18:03:04

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?

jmayaalv19:03:08

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

raul.guajardo19:03:13

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

domkm19:03:46

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.guajardo20:03:58

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 😄