Simplify Giraffe boilerplate?

Open
#335 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
fsharp, graphql

Research direction

Start with the Star Wars sample and inspect Schema.fs alongside the other files described as boilerplate. Compare the repeated setup with Graphscriber's websocket approach, then clarify a non-websocket automation design and the amount of boilerplate reduction that would count as done.

Written by the indexing model from the issue text.

Description

Based on the Star Wars sample, it seems that there is quite a lot of boilerplate that would be needed in any GraphQL API. Only Schema.fs contains the "interesting" domain-specific code and schema; the rest of the files seem to be something that could be entirely automated and would be identical for all services.

Is there a way to avoid the boilerplate?

I just came across Graphscriber, but that seems to only use websockets, and I'm not sure I want that since it could be troublesome for (downtime-free) blue-green deployments.

Dominant language
F#
Stars
406
Forks
74
Avg merge
1d 8h
Merged PRs (30d)
14

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from fsprojects/FSharp.Data.GraphQL

All issues in fsprojects/FSharp.Data.GraphQL

Similar issues

More Backend & API Design issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.