parse-community / parse-community/parse-server

insert items into array using graphql

Open
#7,256 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

type:feature
Dominant language
JavaScript
Stars
21.4k
Forks
4.8k
Avg merge
7h 45m
Merged PRs (30d)
11

Description

New Feature / Enhancement Checklist
Current Limitation

Cannot insert items in the array using graphql. I've also asked a question on SO before. someone suggested me to post an issue

https://stackoverflow.com/questions/66552544/insert-items-into-array-using-graphql-parse-server

The following writes data into note field. I want to add items in the array.

mutation {
  updateParcel(input: { id: "B6aESEwWcA", fields: { notes: ["wow"]}}) {
    parcel {
      objectId
      notes {
        ... on Element {
          value
        }
      }
    }
  }
}
Alternatives / Workarounds

the only alternatives we have is to use Rest or SDK

Contributor guide

Open the contributing guide

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

Start by reproducing the updateParcel GraphQL mutation shown in the issue and compare its array-field behavior with the REST or SDK alternatives. Trace the GraphQL update path for array fields; done means a mutation can add items to an existing notes array without replacing its current contents, with coverage for the demonstrated case.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql, javascript
Domain
api, backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.