FSharp.Data.GraphQL
FSharp.Data.GraphQL copied to clipboard
Sample star wars api question
Sorry if this may have been brought up earlier. The sample app for creating a graphql server looks really daunting. Was wondering if files like https://github.com/fsprojects/FSharp.Data.GraphQL/blob/dev/samples/star-wars-api/WebSocketMiddleware.fs and https://github.com/fsprojects/FSharp.Data.GraphQL/blob/dev/samples/star-wars-api/JsonConverters.fs are really necessary?
@Swoorup I totally agree. We should make the sample as easy as possible. We don't need to demonstrate websockets or middleware in that sample. Care to take a stab at a PR?
Thanks
I'm using that sample to try to get a project up and running. It feels like quite a bit of it like the Helpers, HttpHandlers, and OptionConverter would be generally useful stuff.
I got my whole schema set up and then was a bit lost trying to actually create my endpoint.
Following this sample, I think that a bunch of stuff in there is actually around parsing the incoming request. So, when I got the endpoint up and running in Giraffe, I tried to connect from a VueJS + Apollo client app. It didn't work because Apollo Client sends the query in a certain format. I think the majority of the HttpHandlers.fs
code actually parses out the incoming query, variables and then passes them to the execution pipeline.
So, yeah, it is definitely useful and should be taken into account.
The main issue I have now is that I cannot seem to get the samples working...at all. I cloned the repo, built the client and the server, and the only thing I can get back from the server in Postman is the introspection query, no matter how I formulate the request... :(
@blackdwarf samples must be updated to the latest React. Proceed if you can