For an introduction to GraphQL see here: http://graphql.org/
The API is available on endpoints which differ only in their Auth options:
/{prefix}/graphql
requires a valid JWT token./{prefix}/graphql-session
requires a valid session within the Auth application. This can be obtained by logging in using the GraphiQL endpoint./{prefix}/graphiql
is an UI for testing and developing Graphql queries.The API consists of 4 key queries:
me: User
represents the current user - either identified by the session or the respective JWT. Returns the type User.
organisation_check(id: ID): Boolean
users(uid: Strings51PlatformObjectId: String): [User]
searches for users within the scope of the current user:
organisations(name: Strings51PlatformObjectId: String): [Organisation]
searches by Organisation. The same access logic applies as with the users query.
For the data types and their links, see the built-in documentation available with GraphiQL.
These mutations serve as a demonstration and proof of concept only, until the Auth application offers functionality to update Users and Organisations.
updateUser(uid: String, user: UserInput)
- admin users may edit any user, other users may currently edit only
themselves.
createUser(org: String!user: UserInput!): User