---
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
      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