Invalid schema. Unexpected =

Hello

When I paste the below graphql schema into Rafel (Schema | Bulk Edit ) I get the following error:

Error

Could not alter schema: while lexing union Result = Book | Author type Book { title: String } type Author { name: String } type Query { search(contains: String): [Result] } at line 1 column 13: Invalid schema. Unexpected =

Schema

union Result = Book | Author

type Book {
  title: String
}

type Author {
  name: String
}

type Query {
  search(contains: String): [Result]
}

Ratel is for dealing with DQL schemas and queries. You have pasted a GraphQL schema. They’re different things.

Are you on Dgraph Cloud? Dgraph Cloud comes with an integrated schema editor/data studio that is quite cool

I see. Ok, thank you @chewxy .

I was using Dgraph Cloud, however I managed to run a single query maybe 5 times before I had used all available data.

May I suggest that the Rafel UI clearly state that it is only for Dql.

Working on clearing this confusion up!

Thank you.

Im now trying to create the schema using the python client, and have received exit code 0.

Is there anyway to view this schema, either via a local UI or using the python client?

The schema view in Rafel hasnt shown any changes.

You can use a GraphQL client like Insomnia and then point it to http://localhost:8080/graphql (where localhost:8080 is your dgraph instance address)