From 50fc3a127f5f2bbf580fb7cdef6277df5ef0d43a Mon Sep 17 00:00:00 2001 From: Alexandre Bodin Date: Wed, 12 Jun 2019 14:34:49 +0200 Subject: [PATCH] Add example in getstarted --- .../getstarted/exports/graphql/schema.graphql | 1 + .../users-permissions/config/schema.graphql.js | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 examples/getstarted/extensions/users-permissions/config/schema.graphql.js diff --git a/examples/getstarted/exports/graphql/schema.graphql b/examples/getstarted/exports/graphql/schema.graphql index 935c43a9a7..f6791c920b 100644 --- a/examples/getstarted/exports/graphql/schema.graphql +++ b/examples/getstarted/exports/graphql/schema.graphql @@ -216,6 +216,7 @@ type Query { test(id: ID!): MypluginTest tests(sort: String, limit: Int, start: Int, where: JSON): [MypluginTest] me: UsersPermissionsMe + userCustomRoute: String } input RoleInput { diff --git a/examples/getstarted/extensions/users-permissions/config/schema.graphql.js b/examples/getstarted/extensions/users-permissions/config/schema.graphql.js new file mode 100644 index 0000000000..24d93760bb --- /dev/null +++ b/examples/getstarted/extensions/users-permissions/config/schema.graphql.js @@ -0,0 +1,15 @@ +module.exports = { + query: ` + userCustomRoute: String + `, + resolver: { + Query: { + userCustomRoute: { + resolver: { + plugin: 'users-permissions', + handler: 'UsersPermissions.customRoute', + }, + }, + }, + }, +};