Dgraph: Ratel not compatible with tour

Created on 9 Sep 2019  路  5Comments  路  Source: dgraph-io/dgraph

Documentation

I am following the tour and while some mutations run correctly from the tour page, I cant run them from Ratle

For example in https://tour.dgraph.io/intro/3/, pressing the "run" button gives

{
  "data": {
    "code": "Success",
    "message": "Done"
  }
}

but copy and pasting that same content into a Mutate or Query in Ratle gives

```Error Name: t

Message: while lexing # Define Types

type Person {
name: string
age: int
friend: [Person]
}

type Animal {
name: string
}

Define Directives and index

name: string @index(term) @lang .
age: int @index(int) .
friend: [uid] @count .
at line 3 column 0: Invalid block: [type]

URL: http://localhost:8080/mutate?commitNow=true

```

Most helpful comment

This is a Schema text. It is not for use in Mutations or Query fields. Alter operations only.
In the case of Ratel, you have to go to Schema and "Bulk Edit". There you can paste it.

All 5 comments

This is a Schema text. It is not for use in Mutations or Query fields. Alter operations only.
In the case of Ratel, you have to go to Schema and "Bulk Edit". There you can paste it.

Thanks! I am not sure if this info is part of the tour. Maybe I missed it.

This info isn't explicit in the tour. But you can see that mutations, queries, and schema are made in different paths. Like, Alter for schema, query for queries and mutation for mutation.

Only in docs, you can have some detailed info about the Alter. But I think this is kind of implicit when using the tour.

Cheers.

I understand. Taking into account that the tour is taken by people who have not seen dgraph ever before and have around 15 minutes to explore it, I would suggest that it is as friction less as possible

Its easy to fix, just add a comment in the beginning when you say that you can copy and paste the operations into Ratle

Was this page helpful?
0 / 5 - 0 ratings

Related issues

KadoBOT picture KadoBOT  路  5Comments

jerodsanto picture jerodsanto  路  3Comments

djdoeslinux picture djdoeslinux  路  4Comments

fritzblue picture fritzblue  路  5Comments

jeffkhull picture jeffkhull  路  3Comments