silverstripe-frameworktest/_config/graphql.yml

60 lines
1.5 KiB
YAML
Raw Normal View History

---
Name: frameworktestgraphql
After: '#graphqlconfig'
Only:
classexists: 'SilverStripe\GraphQL\Schema\Schema'
---
SilverStripe\Core\Injector\Injector:
SilverStripe\GraphQL\Schema\Schema.frameworktest:
class: SilverStripe\GraphQL\Schema\Schema
constructor:
schemaKey: frameworktest
SilverStripe\GraphQL\Controller.frameworktest:
class: SilverStripe\GraphQL\Controller
constructor:
schema: frameworktest
SilverStripe\Control\Director:
rules:
'frameworktest/graphql':
Controller: '%$SilverStripe\GraphQL\Controller.frameworktest'
SilverStripe\GraphQL\Schema\Schema:
schemas:
frameworktest:
config:
modelConfig:
type_mapping:
SilverStripe\FrameworkTest\Model\Company: Company
SilverStripe\FrameworkTest\Model\Employee: Employee
2021-02-25 22:05:34 +01:00
models:
SilverStripe\FrameworkTest\Model\Company:
fields:
ID: true
Name: true
Category: true
Revenue: true
CEO: true
Employees: true
PastEmployees: true
operations:
read: true
update: true
create: true
delete: true
readOne: true
SilverStripe\FrameworkTest\Model\Employee:
fields:
ID: true
Name: true
Biography: true
DateOfBirth: true
Category: true
operations:
read: true
update: true
create: true
delete: true
readOne: true