graphiti icon indicating copy to clipboard operation
graphiti copied to clipboard

How to generate meta object

Open masterT opened this issue 2 years ago • 4 comments

I want to be able to generate meta object on a top-level document (for resource collection), but also for a resource object.

Is it possible with Graphiti? I know the DSL ::stats method can be used to generate the "meta object" for stats.

masterT avatar Apr 20 '22 15:04 masterT

No per-resource metadata at the moment (most clients don't parse it), but would love to see

richmolj avatar Apr 20 '22 16:04 richmolj

I dig into the code and see how it could be done.

masterT avatar Apr 20 '22 17:04 masterT

@richmolj how can I set it for resource collection response (not is the stats key)?

masterT avatar Apr 20 '22 17:04 masterT

respond_with(resource, meta: { some: 'thing' })

richmolj avatar Apr 20 '22 18:04 richmolj