Determine why a Union type wasn't used in graphql schema #105
Labels
No Label
bug
C:CLI
C:Crypto
C:Encoding
C:Proto
C:Types
dependencies
docker
documentation
duplicate
enhancement
go
good first issue
help wanted
high priority
in progress
invalid
javascript
low priority
medium priority
question
Status: Stale
Type: ADR
Type: Build
Type: CI
Type: Docs
Type: Tests
urgent
wontfix
Copied from Github
Kind/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: cerc-io/laconicd-deprecated#105
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Our GraphQL endpoint returns registry records conforming to a property set schema with
Value
type defined here.This is a struct or "sum" type, where all of
string
,json
,reference
are present but by convention all except one is null.This is a way of implementing a variant, union, or "product" type.
But GraphQL has union types.
Curious to understand why we didn't use that capability.
I suspect the answer relates to the fact that when defining a GraphQL union, all variants must be other objects, not scalars. So, we would have to wrap everything like
IntVariant
for int, etc. and perhaps that amount of boilerplate was deemed not worth it - I think @ashwinphatak's team would have to confirm, though.(And to be pedantic, a sum type would be a union, what we have now is a product type)
Note: schema in cerc-io/laconicd#112 will use union types