FSharp.Data.GraphQL icon indicating copy to clipboard operation
FSharp.Data.GraphQL copied to clipboard

Is there a todo sample?

Open aggieben opened this issue 11 months ago • 7 comments

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

aggieben avatar Mar 07 '24 22:03 aggieben

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

xperiandri avatar Mar 10 '24 11:03 xperiandri

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

aggieben avatar Apr 04 '24 20:04 aggieben

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

xperiandri avatar Apr 04 '24 21:04 xperiandri

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.

aggieben avatar Apr 04 '24 21:04 aggieben

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 avatar Apr 04 '24 22:04 valbers

Related: #308

valbers avatar Apr 04 '24 22:04 valbers

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

xperiandri avatar Apr 05 '24 04:04 xperiandri