Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ ___
- Add REST API endpoint `/loginAs` to create session of any user with master key; allows to impersonate another user. (GormanFletcher) [#7406](https://github.com/parse-community/parse-server/pull/7406)
- Add official support for MongoDB 5.0 (Manuel Trezza) [#7469](https://github.com/parse-community/parse-server/pull/7469)
- Added Parse Server Configuration `enforcePrivateUsers`, which will remove public access by default on new Parse.Users (dblythy) [#7319](https://github.com/parse-community/parse-server/pull/7319)
- Downgrade GraphQL Relay to 0.7.0 to allow usage of objectId size higher than `19` on GraphQL API (Moumouls) [#7622](https://github.com/parse-community/parse-server/issues/7622)
Comment thread
mtrezza marked this conversation as resolved.
Outdated

## Other Changes
- Support native mongodb syntax in aggregation pipelines (Raschid JF Rafeally) [#7339](https://github.com/parse-community/parse-server/pull/7339)
Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"follow-redirects": "1.14.1",
"graphql": "15.6.0",
"graphql-list-fields": "2.0.2",
"graphql-relay": "0.9.0",
"graphql-relay": "0.7.0",
"graphql-tag": "2.12.5",
"graphql-upload": "11.0.0",
"intersect": "1.0.1",
Expand Down
29 changes: 24 additions & 5 deletions spec/ParseGraphQLServer.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2284,8 +2284,7 @@ describe('ParseGraphQLServer', () => {
expect(nodeResult.data.node2.objectId).toBe(obj2.id);
expect(nodeResult.data.node2.someField).toBe('some value 2');
});
// TODO: (moumouls, davimacedo) Fix flaky test
xit('Id inputs should work either with global id or object id', async () => {
it('Id inputs should work either with global id or object id', async () => {
try {
await apolloClient.mutate({
mutation: gql`
Expand Down Expand Up @@ -2592,9 +2591,12 @@ describe('ParseGraphQLServer', () => {
.map(value => value.node.someField)
.sort()
).toEqual(['some value 22', 'some value 44']);
expect(
findSecondaryObjectsResult.data.secondaryObjects.edges[0].node.id
).toBeLessThan(findSecondaryObjectsResult.data.secondaryObjects.edges[1].node.id);
// NOTE: Here @davimacedo tried to test RelayID order, but the test is wrong since
// "objectId1" < "objectId2" do not always keep the order when objectId is transformed
// to base64 by Relay
// "SecondaryObject:bBRgmzIRRM" < "SecondaryObject:nTMcuVbATY" true
// base64("SecondaryObject:bBRgmzIRRM"") < base64(""SecondaryObject:nTMcuVbATY"") false
// "U2Vjb25kYXJ5T2JqZWN0OmJCUmdteklSUk0=" < "U2Vjb25kYXJ5T2JqZWN0Om5UTWN1VmJBVFk=" false
expect(
findSecondaryObjectsResult.data.secondaryObjects.edges[0].node.objectId
).toBeLessThan(
Expand Down Expand Up @@ -2760,6 +2762,23 @@ describe('ParseGraphQLServer', () => {
handleError(e);
}
});
it('Id inputs should work either with global id or object id with objectId higher than 19', async () => {
await reconfigureServer({ objectIdSize: 20 });
const obj = new Parse.Object('SomeClass');
await obj.save({ name: 'aname', type: 'robot' });
const result = await apolloClient.query({
query: gql`
query getSomeClass($id: ID!) {
someClass(id: $id) {
objectId
id
}
}
`,
variables: { id: obj.id },
});
expect(result.data.someClass.objectId).toEqual(obj.id);
});
});
});

Expand Down