refactor(GraphQL): Rename objectId to id (#5985)
* refactor(GraphQL): Rename objectId to id Renames `objectId` to `id` for the GraphQL API. Queries, mutations, custom and generic types were updated. Removes `RELATION_INPUT` and `POINTER_INPUT`. Now the user just need to provide the ID of the object to link. * fix: Column "id" not found on Postgres * fix: Avoid deleting Parse class objectId * fix: Undo objectId removal on mutations * fix: Handle generic mutation id
This commit is contained in:
committed by
Antonio Davi Macedo Coelho de Castro
parent
194f548464
commit
b47d9fb17e
@@ -119,7 +119,7 @@ const transformers = {
|
||||
value.add = value.add.map(input => ({
|
||||
__type: 'Pointer',
|
||||
className: targetClass,
|
||||
objectId: input.objectId,
|
||||
objectId: input,
|
||||
}));
|
||||
op.ops.push({
|
||||
__op: 'AddRelation',
|
||||
@@ -133,7 +133,7 @@ const transformers = {
|
||||
objects: value.remove.map(input => ({
|
||||
__type: 'Pointer',
|
||||
className: targetClass,
|
||||
objectId: input.objectId,
|
||||
objectId: input,
|
||||
})),
|
||||
});
|
||||
}
|
||||
@@ -171,11 +171,11 @@ const transformers = {
|
||||
objectId: nestedObjectToAdd.objectId,
|
||||
};
|
||||
}
|
||||
if (value.link && value.link.objectId) {
|
||||
if (value.link) {
|
||||
return {
|
||||
__type: 'Pointer',
|
||||
className: targetClass,
|
||||
objectId: value.link.objectId,
|
||||
objectId: value.link,
|
||||
};
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
const parseMap = {
|
||||
id: 'objectId',
|
||||
_or: '$or',
|
||||
_and: '$and',
|
||||
_nor: '$nor',
|
||||
|
||||
Reference in New Issue
Block a user