Error when running query with @id

I try to use dgraphjs and alter the schema with query bellow

type user {
    username: String! @id
}

got the error

Expected new line after field declaration. Got @

anyway running on dgraph cloud dashboard with schema query is working find without any problem.

dgraphjs is made for the DQL schema. @id is in the graphql schema.

J

1 Like

Does dgraph-js-http support graphql schema instead of DQL or still the same like dgraph-js?

No, you can look at my repo though.

J