mirumee / ariadne-website

The code that powers Ariadne website
https://ariadnegraphql.org
BSD 3-Clause "New" or "Revised" License
23 stars 37 forks source link

error-messaging.md example doesn't work #164

Closed j0057 closed 6 months ago

j0057 commented 6 months ago

The page https://ariadnegraphql.org/docs/error-messaging has this GraphQL schema example:

type Mutation {
    login(username: String!, password: String!) {
        error: String
        user: User
    }
}

Defining some kind of anonymous sub-object doesn't seem to be valid GraphQL schema, either with or without a : between the ) and the {.

It should be something like this:

type Mutation {
    login(username: String!, password: String!): LoginResult
}

type LoginResult {
    error: String
    user: User
}
rafalp commented 6 months ago

Fixed. Thanks for reporting!