silverstripe-frameworktest/_config/graphql.yml
Aaron Carlino 030208712a
NEW GraphQL 4 Compatability (#72)
* Initial compat for graphql4
* Fix graphql config
2020-10-22 15:00:29 +13:00

59 lines
1.5 KiB
YAML

---
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:
modelConfig:
type_mapping:
SilverStripe\FrameworkTest\Model\Company: Company
SilverStripe\FrameworkTest\Model\Employee: Employee
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