fsprojects / FSharp.Data.GraphQL

FSharp implementation of Facebook GraphQL query language.
http://fsprojects.github.io/FSharp.Data.GraphQL/
MIT License
399 stars 73 forks source link

Is there a todo sample? #463

Open aggieben opened 6 months ago

aggieben commented 6 months ago

Description

Is there a todo sample anywhere? It's mentioned in the Getting Started section of the main site, but I don't see it in the repo.

image

xperiandri commented 6 months ago

Do you mean this file? https://github.com/fsprojects/FSharp.Data.GraphQL/blob/246d6c037a26e1f91fdbd8c373634f55aa74f4d7/samples/apollo-client/README.md

aggieben commented 5 months ago

No, I think I was looking for the server implementation. What backend would the apollo-client sample be targeted toward?

xperiandri commented 5 months ago

Yes, it is for the client type provider demo and tests only

aggieben commented 5 months ago

Are there any simple server-side samples, or maybe even other projects that consume FSharp.DataGraphQL? I'm trying to build something simple in order to learn the lib, and I'm getting lost from the get-go. Doing the things in the "Getting Started" guide don't work and the Star Wars sample is too much.

If I need to, I can open a more detailed issue but I thought it was worth asking for other examples.

valbers commented 5 months ago

I think you might be interested in taking a look at the new Giraffe integration. I just noticed that the documentation needs to be updated and the part with:

.UseGiraffe
 (HttpHandlers.handleGraphQL<Root>
    applicationLifetime.ApplicationStopping
    (loggerFactory.CreateLogger("FSharp.Data.GraphQL.Server.AspNetCore.HttpHandlers.handleGraphQL"))
 )

Should be

.UseGiraffe(HttpHandlers.graphQL<Root>)
valbers commented 5 months ago

Related: #308

xperiandri commented 5 months ago

This is the simplest demo https://github.com/fsprojects/FSharp.Data.GraphQL/blob/releases/2.0.0/samples/relay-modern-starter-kit/server.fsx

Looks like it should be updated too 🙂 I mean paths in #r and variables deserialization code