-
Notifications
You must be signed in to change notification settings - Fork 169
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
Relationships not yielding results #284
Comments
First, it looks you're mocking out a JSON:API backend so I would use the JSONAPISerializer: import { JSONAPISerializer } from 'miragejs'
new Server({
serializers: {
application: JSONAPISerializer
}
}) Second, the response to |
@samselikoff Thanks on the advice for adding the serializer; That helped! Are there plans for a JSON-LD serializer in the future? For the information you requested, this is the output (the companies part):
|
I was using the faker.js API incorrectly. It's |
Awesome, glad you found it! Haven't heard of JSON LD but if it's popular enough we can add it. For now if I was building a JSON LD app I'd probably make my own application serializer by extending the base You can take a look at the source and see if you'd like to do that: |
I have the following fake API:
When I do
GET /api/companies
I get one result back:{ id: "1" }
. I'm expecting 5 companies back. Also when doingGET /api/job/1?include=company
I never get the company back in the result, but I get the rest of the fake information.Any idea what's going on here with my company model? It's simply not working.
The text was updated successfully, but these errors were encountered: