I think ill likely just create a service to take an id, method and size eg /image/1234/maxSize/300/300
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?
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
interested to hear other opinions as well
yeah pre rendered is interesting, but then youre moving templating out of jsx into ss…
unless you have server side rendering going
Has anyone got any examples of how to use a custom nested query using
ListQueryScaffolder? I keep getting this:
- "SilverStripe\\GraphQL\\Scaffolding\\Scaffolders\\OperationScaffolder resolver must be a closure or implement SilverStripe\\GraphQL\\OperationResolver"
Might have some time to debug this today. Can you share your code?
In a TypeCreator how do I specify a type of Image?
well, a string, as you can either pass a URL of the file or stringified (e.g. base64 encoded) file content