Can I use other language to name a type in graphql schema?

What I try:

 type 产品 {
        productID: ID!
        名字: String @search(by: [term])
        reviews: [Review] @hasInverse(field: about)

post the schema to “localhost:8080/admin/schema”.

And I got an error:

    "errors": [
            "message": "resolving updateGQLSchema failed because input:1: Expected Name, found <Invalid>\n (Locations: [{Line: 3, Column: 4}])",
            "extensions": {
                "code": "Error"

So, does graphql schema can use other language like chinese to name a type or predicate?

Looks like line 3 is the problem. Expected Name, but "名字" means name in chinese… lol

1 Like

No, According to GraphQL Spec the character set for any name in GraphQL schema is: /[_A-Za-z][_0-9A-Za-z]*/.
Spec says:

Names in GraphQL are limited to this ASCII subset of possible characters to support interoperation with as many other systems as possible.

OK, got it.Thanks for reply.