2021-02-26 11:28:19 +07:00
|
|
|
---
|
|
|
|
Name: webapp-base-graphql
|
|
|
|
After: graphqlconfig
|
|
|
|
---
|
|
|
|
SilverStripe\Control\Director:
|
|
|
|
rules:
|
|
|
|
'graphql': '%$SilverStripe\GraphQL\Controller.default'
|
|
|
|
|
|
|
|
SilverStripe\GraphQL\Controller:
|
|
|
|
cors:
|
|
|
|
Enabled: true
|
2021-03-03 23:11:59 +07:00
|
|
|
Allow-Origin: '*'
|
2021-02-26 11:28:19 +07:00
|
|
|
Allow-Headers: 'Authorization, Content-Type, Content-Language, apikey'
|
|
|
|
Allow-Methods: 'GET, PUT, DELETE, OPTIONS, POST'
|
|
|
|
#Allow-Credentials: 'true'
|
|
|
|
Max-Age: 600 # 600 seconds = 10 minutes.
|
|
|
|
|
|
|
|
SilverStripe\GraphQL\Auth\Handler:
|
|
|
|
authenticators:
|
2021-03-15 03:45:35 +07:00
|
|
|
- class: App\GraphQL\APIKeyAuthenticator
|
2021-02-26 11:28:19 +07:00
|
|
|
priority: 30
|
|
|
|
|
|
|
|
SilverStripe\GraphQL\Manager.default:
|
|
|
|
properties:
|
|
|
|
Middlewares:
|
2021-03-15 03:45:35 +07:00
|
|
|
APIKeyMiddleware: App\GraphQL\APIKeyMiddleware
|
2021-02-26 11:28:19 +07:00
|
|
|
|
|
|
|
SilverStripe\GraphQL\Manager:
|
|
|
|
schemas:
|
|
|
|
default:
|
|
|
|
types:
|
2021-03-15 03:45:35 +07:00
|
|
|
member: 'App\GraphQL\MemberTypeCreator'
|
|
|
|
page: 'App\GraphQL\PageTypeCreator'
|
|
|
|
element: 'App\GraphQL\ElementTypeCreator'
|
2021-02-26 11:28:19 +07:00
|
|
|
queries:
|
2021-03-15 03:45:35 +07:00
|
|
|
readPages: 'App\GraphQL\PaginatedReadPagesQueryCreator'
|
|
|
|
readMembers: 'App\GraphQL\ReadMembersQueryCreator'
|
|
|
|
paginatedReadMembers: 'App\GraphQL\PaginatedReadMembersQueryCreator'
|