Skip to content

Allow a pointer to be removed using GraphQL #7517

Closed

Description

@cjbland

New Feature / Enhancement Checklist

Current Limitation

I'm trying to clear out a column that currently has a pointer value. For example, I have a class named "Issue" and a field on that class is "user" which is defined as a pointer to the "_User" class. Once that field is set, I can never unset it using GraphQL

Feature / Enhancement Description

The current way to set a pointer on a field with GraphQL is: user: { link: 'myuserid' }. My suggestion (which I will submit a PR for) is to use something like: user: { unlink: true}. Looking through the code, this should be a pretty good and non-invasive use-case.

Example Use Case

Alternatives / Workarounds

My current work around is to issue a REST API call to clear out the field.

3rd Party References

Activity

  1. added a commit that references this issue on Aug 24, 2021
  2. added
    type:featureNew feature or improvement of existing feature
    and removed on Dec 6, 2021
  3. Moumouls commented on Oct 24, 2024

    @Moumouls
    Member

    Unlink pointer is supported by parse following GQL convention

    mutation aMutation($anID: ID!) {
    			updateSomething(
    				input: {
    					id: $anID
    					fields: { somePointer: { link: null } }
    				}
    			) {
    				someThing {
    					id
    				}
    			}
    		}
  4. added
    type:questionSupport or code-level question
    and removed
    type:featureNew feature or improvement of existing feature
    on Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:questionSupport or code-level question

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions