graphql-hive / graphql-hive/SOFA

[FEATURE REQUEST] Missing functionality to represent user scalars as swagger types

Open
#570 1 comment 3 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
1.1k
Forks
91
Avg merge
5h 10m
Merged PRs (30d)
1

Description

I often use two scalars, `Email` and `URL` to represent, well, Email's and URL's in input as well as output types. When I use SOFA with openapi/swagger integration, these scalars show up as objects rather than their actual type, which is string. This is a very specific use case so I think SOFA should have an option for users to provide `scalar <-> type name` mapping when creating an openapi instance.

I'm thinking of contributing this myself, let me know what you think.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing SOFA's OpenAPI/Swagger integration and how GraphQL scalar types are currently represented in generated schemas. Identify the option used when creating an OpenAPI instance and the tests covering scalar output. Done means users can provide scalar-to-type mappings so scalars such as Email and URL are emitted as strings rather than objects.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql, openapi, typescript
Domain
api, backend-api-design
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.