sander_ha

Ah, a specific "OrderInput" type must be defined with this snippet on it:

  1. protected $inputObject = true;
sander_ha

Trying to do this for a mutator:

  1. public function args(): array
  2. {
  3. return [
  4. 'Order' => ['type' => $this->manager->getType('Order')]
  5. ];
  6. }
sander_ha

I'm back with another question! This section simply says "TODO" : https://github.com/silverstripe/silverstripe-graphql#define-input-types Does that mean that you can define an Object type as input type?

Show 1 attachment(s)
GitHub  
silverstripe/silverstripe-graphql

Serves SilverStripe data as GraphQL representations - silverstripe/silverstripe-graphql

Hide attachment content
sander_ha

Yeah just noticed the TODO and thought it was funny 🙂

sander_ha

Now I just hope its only a "TODO" for the docs, but that the functionality is actually there heh

sander_ha

"Define input types" section of the GraphQL docs 🙂

sander_ha

That moment you find what you're looking for in the docs, but then it just says TODO..

sander_ha

Yes like this:

  1. SilverStripe\Core\Injector\Injector:
  2. SilverStripe\GraphQL\Manager.default:
  3. properties:
  4. Middlewares:
  5. ### Disable auto CSRF protection because we will use JWT security
  6. CSRFMiddleware: false
sander_ha
  1. SilverStripe\GraphQL\Manager.default:
  2. properties:
  3. Middlewares:
  4. ### Disable auto CSRF protection because we will use JWT security
  5. CSRFMiddleware: false # TODO currently not working

Doesnt work either