hasura / hasura/graphql-engine

Scalar type Text always maps to String which is a GraphQL Scalar

Open
#10,220 0 comments 0 reactions 0 assignees View on GitHub
k/enhancement
Dominant language
TypeScript
Stars
32.1k
Forks
3k
PR merge metrics
PR metrics pending

Description

When using GraphQL.tada or other solutions you need to manually map a Text to String

For example:

```
export const graphql = initGraphQLTada<{
introspection: introspection;
scalars: {
Text: string;
Int4: number;
Timestamptz: string;
Jsonb: string;
Numeric: string;
};
}>();
```

Notice, Text maps to String but it would be better to have the scalar just be String directly.

Ideally, the scalar would be String

Contributor guide

Open the contributing guide

Research direction

Start by tracing how the Text scalar is exposed in the GraphQL schema and how its mapping is consumed by GraphQL.tada. Compare the generated scalar definition with the requested direct String mapping, then verify that Text is no longer exposed as a separate GraphQL scalar.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql, typescript
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.