Skip to main content

How to Find Out More

How to See More

By Searching

In the top right corner you should see a link marked < Docs (assuming it isn't already open for you). Click on it to open the documentation pane. This is one of the most important features of GraphQL Explorer, it allows you to find out about which object types you can retrieve, and what fields each of those types has on it.

Let's suppose that we wanted to expand our example query. What other fields are there?

In the Search Schema box let's type User. The top result should be the User graphql type that we're looking for. Click on it and you should be presented with the list of fields that the User object makes available to you, and the description for each field in case you are unsure of what it means.

By Browsing

If you don't know what the type (you can think of this as an object if your less familiar with graphql lingo) that you want, it can be easier to browse the schema, especially if you're just trying to get familiar with what the Legalesign API can do.

In the Documentation Explorer click the < Back link in the top bar until you're at the root of the schema. You should see just three items or root types in the schema viewer: Query, Mutation and Subscription. These are the fundemental building blocks of graphql, but for the moment let's just look at Query to keep things simple. Click on Query to drill down into that type.

You should be presented with a list of types or objects similar to below, for clarity we'll abbreviate the whole list:

organisation(id: ID, orgId: ID): Organisation
Returns an Organisation.

.
.
.

group(id: ID, groupId: ID): Group
Returns a Group.

user(id: ID, userId: ID): User
Returns a User (or the current user if id is null).

Notice that there is a brief description of each, and that the User type gives us that important clue that we can get the current user information if we omit id from the query. Click on User to show more about it.

Now we see a list of all the fields, exactly the same as if we had directly searched for User - but now we know how to explore and find the names of other interesting types.

Alter the Query

There's lot of extra security fields so let's find out what we can do, alter you query to the following:

query MyFirstQuery {
myInfo: user {
id
name
canAdministerUsers
}
}

And hit the play button. You should see that your results have changed.

{
"data": {
"myInfo": {
...
"canAdministerUsers": true
}
}
}

This shows that the test user has the ability to create, update and remove user accounts - and if you're using a free trial account to test the API, you probably have administrator access.