blueo

if it is a connection do you need the edges { node { part?

blueo

if so you may need :

  1. query myQuery {
  2. Regions {
  3. ID,
  4. Title
  5. }
  6. }
blueo

yeah i believe so - you can use the scaffolder to create the types from the region/topic data objects

blueo

you could define your own type like so: https://github.com/silverstripe/silverstripe-graphql#define-types then have a custom query/resolver that returns your type (which has a list of regions/topics Type::listOf($this->manager->getType('region')))

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

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

Hide attachment content
blueo

I think $CurrentLocale just returns the locale code eg en_NZ. You could always create a function to return the locale object - if you want it globally you can define a template provider like in vendor/tractorcow/silverstripe-fluent/src/View/FluentTemplateGlobalProvider.php

blueo

We've run into this problem a bit - something that is being worked on is 'snapshots' which can help displaying this kind of info: https://github.com/silverstripe/silverstripe-versioned-snapshots

Show 1 attachment(s)
silverstripe/silverstripe-versioned-snapshots

Tracks version history and modification state in DataObject ownership structures

Hide attachment content
blueo

ah interesting, I've done something like that before - made the request a multipart request with the file, created a 'file' type to hold the data. Went reasonably well. I think silverstripe uses a separate endpoint for file uploads

👍 (1)