typelevel / typelevel/grackle

Sort out union subtyping

Open
#593 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Scala
Stars
189
Forks
32
Avg merge
18h 31m
Merged PRs (30d)
37

Description

Currently the definition of the case(s) for unions in <:< don't implement a particularly sane subtype relation. Nonetheless the current semantics are relied on, eg. in fragmentApplies. Probably unions should only relate as subtypes to other unions and we should introduce a separate relation for fragment applicability.

Contributor guide

Open the contributing guide

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.

Research direction

Start by tracing the union case definition for <: and the fragmentApplies entry point, then identify which current subtype semantics those uses rely on. The issue is complete when the intended union subtype relation and the separate fragment-applicability relation are agreed and consistently represented.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql, scala
Domain
backend-api-design
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.