Skip to content

请问字段可否支持多语言 Can the field support multiple languages? #3933

Closed
@Duanxs

Description

@Duanxs

目前,Graphql 不支持中文字段,使用上略有不便。像 mysql、mongoDB 均支持多语言字段名,希望 Graphql 也跟进,以方便全球各语言用户。

machine translation:
Currently, Graphql does not support Chinese fields, which is slightly inconvenient. Like mysql and mongoDB, they support multilingual field names, and I hope that Graphql will follow suit to facilitate users in various languages around the world.

报错样例:

type 用户 {
    姓名: String!
}
GraphQLError: Syntax Error: Unexpected character: U+7528.
    at syntaxError (/path/node_modules/.pnpm/[email protected]/node_modules/graphql/error/syntaxError.js:15:10)
    at readNextToken (/path/node_modules/.pnpm/[email protected]/node_modules/graphql/language/lexer.js:420:28)
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions