JSONAPI-Resources / JSONAPI-Resources/jsonapi-resources

Any recommended workaround for embedding resources in Create/Update requests

Open
#775 10 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Type: Enhancement Type: Question
Dominant language
Ruby
Stars
2.3k
Forks
546
PR merge metrics
No merged PRs in 30d

Description

Hi,

I've read up a lot of information about how 'embedded' / 'nested' resources are scheduled for v1.1 of the json-api but I was just wondering if anyone using jsonapi-resources has an interim solution, for de-serializing create/update requests where I can create / update a set of related entities. In the case of the create they wouldn't have client generated ids. I'm just hoping to create them as Rails nested resources.

Is there possibly a workaround for json-api resources similar to what was created for Active Model Serializers here: https://github.com/json-api/json-api/issues/795#issuecomment-202810800

I'm just trying to create a a few related entries in an atomic request.

For record fetching, I use sideloading.

I'm using Ember-data with the EmbeddedRecordsMixin to include the embedded relationships

Thanks for any suggestions

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no repository files or tests; start by tracing jsonapi-resources request deserialization for create/update and compare the linked Active Model Serializers workaround. Done means establishing a path for atomic creation and updating of related entities without client-generated IDs.

Written by the indexing model from the issue text.

Assessment

Tech stack
rails, ruby
Domain
api, backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.