Skip to content

GraphQL source #246

Answered by dillonkearns
prange asked this question in Q&A
Nov 2, 2021 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

Hello! This is the perfect spot for this question 👍

I do this quite often with dillonkearns/elm-graphql and I would definitely recommend it! Here's a code snippet you can use for that: https://github.com/dillonkearns/incremental-elm-web/blob/1d6248dafbb9c8918fb47ebe9322ad55f1c8b2da/src/Request.elm.

module Request exposing (staticGraphqlRequest)

import DataSource exposing (DataSource)
import DataSource.Http
import Graphql.Document
import Graphql.Operation exposing (RootQuery)
import Graphql.SelectionSet exposing (SelectionSet)
import Json.Encode as Encode
import Pages.Secrets as Secrets


staticGraphqlRequest : SelectionSet value RootQuery -> DataSource value
staticGraphqlRequest selectio…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@prange
Comment options

Answer selected by prange
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants