View more context

 

Bjorn Bojumble

I think ill likely just create a service to take an id, method and size eg /image/1234/maxSize/300/300

Bjorn Bojumble

Question: Querying Elements for the Front end: setup a type for each element? or just a single type that serializes the element fields we need? pros/cons?

MichalKleiner

we used a mix… couldn’t be bothered architecting every single type, but we wanted some structure to it, e.g. title, classname, taxonomy terms and what not and the rest serialised or pre-rendered

Bjorn Bojumble

yeah pre rendered is interesting, but then youre moving templating out of jsx into ss…

nils

Has anyone got any examples of how to use a custom nested query using ListQueryScaffolder? I keep getting this:

  1. "SilverStripe\\GraphQL\\Scaffolding\\Scaffolders\\OperationScaffolder resolver must be a closure or implement SilverStripe\\GraphQL\\OperationResolver"
unclecheese

Might have some time to debug this today. Can you share your code?

nils

Need to check if I got it stashed, ended up doing something else in the end

MichalKleiner

well, a string, as you can either pass a URL of the file or stringified (e.g. base64 encoded) file content