1. Creating schema
- Create Api
To start with a Universal Data Graph from scratch head over to the dashboard and click on “APIs” in the left menu. Then click the “Add New API” and fill the form according to the following screenshot. You might want to give your Graph an individual name.
- Set Authentication
To get started easily we’ll set the API to Keyless. To do this, scroll down to the Authentication section. But keep in mind that you should not use Keyless for most production environments.
- Create Schema
Switch to schema tab in your designer and you should already see a default schema. We will edit the schema as follows to connect with our datasources later.
type Mutation {
default: String
}
type Query {
user(id: String): User
}
type Review {
id: String
text: String
userId: String
user: User
}
type User {
id: String
username: String
reviews: [Review]
}
- Save
Click on save button and that should create our first UDG API
Now if we try to query our UDG API it should error at this moment as we do not have any data-source attached to it, let’s see how we can do that in next section.