Skip to content

Allow a pointer to be removed using GraphQL #7517

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

Closed
3 tasks done
cjbland opened this issue Aug 23, 2021 · 1 comment
Closed
3 tasks done

Allow a pointer to be removed using GraphQL #7517

cjbland opened this issue Aug 23, 2021 · 1 comment
Labels
type:question Support or code-level question

Comments

@cjbland
Copy link
Contributor

cjbland commented Aug 23, 2021

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

cjbland added a commit to cjbland/parse-server that referenced this issue Aug 24, 2021
@mtrezza mtrezza added type:feature New feature or improvement of existing feature and removed type:improvement labels Dec 6, 2021
@Moumouls
Copy link
Member

Unlink pointer is supported by parse following GQL convention

mutation aMutation($anID: ID!) {
			updateSomething(
				input: {
					id: $anID
					fields: { somePointer: { link: null } }
				}
			) {
				someThing {
					id
				}
			}
		}

@mtrezza mtrezza added type:question Support or code-level question and removed type:feature New feature or improvement of existing feature labels Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:question Support or code-level question
Projects
None yet
Development

No branches or pull requests

3 participants