Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to generate meta object #413

Open
masterT opened this issue Apr 20, 2022 · 4 comments
Open

How to generate meta object #413

masterT opened this issue Apr 20, 2022 · 4 comments

Comments

@masterT
Copy link

masterT commented Apr 20, 2022

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 masterT changed the title How to generate meta for resource and resource collection How to generate meta object Apr 20, 2022
@richmolj
Copy link
Contributor

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

@masterT
Copy link
Author

masterT commented Apr 20, 2022

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

@masterT
Copy link
Author

masterT commented Apr 20, 2022

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

@richmolj
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants