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

Additional Examples (for Handlers) #377

Open
aaronfischer opened this issue Feb 20, 2018 · 2 comments
Open

Additional Examples (for Handlers) #377

aaronfischer opened this issue Feb 20, 2018 · 2 comments

Comments

@aaronfischer
Copy link

aaronfischer commented Feb 20, 2018

Hello!

I was able to get up and running with this and its been in production on a very very small api, just 1 resource, I'd like to expand it but I'm a bit lost at how to do that. The /examples/** are a bit sparse when it comes to /handlers. (Really just: module.exports = new jsonApi.MemoryHandler() which isn't particular helpful) I'd love to see a few examples of how to override/customize search or update with some custom handling.

Is there anyway you could provide some additional examples as a jumping off point?

@paparomeo
Copy link
Contributor

paparomeo commented Feb 27, 2018

(Apologies for the delay in getting back to you). I'm sure we can help @aaronfischer (and in the process improve the documentation). Do you have any particular use cases in mind? Do you have a particular data store in mind?

@dorothythurston
Copy link

@aaronfischer I found looking at the examples in the actual memory handler to be some what helpful... for example when i was trying to understand how to return the totalCount in the meta for search results i looked here... https://github.com/holidayextras/jsonapi-server/blob/master/lib/MemoryHandler.js#L29 but I do agree that it is slightly confusing to be new to this library and not have specific custom handlers for the examples instead of having everything tucked away in the memory handler

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

3 participants