Change ACL to Non null (#6249)
This commit is contained in:
committed by
Antonio Davi Macedo Coelho de Castro
parent
4435154cf9
commit
62459962dd
264
package-lock.json
generated
264
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -115,14 +115,7 @@ const findObjects = async (
|
|||||||
options.subqueryReadPreference = subqueryReadPreference;
|
options.subqueryReadPreference = subqueryReadPreference;
|
||||||
}
|
}
|
||||||
|
|
||||||
return await rest.find(
|
return rest.find(config, auth, className, where, options, info.clientSDK);
|
||||||
config,
|
|
||||||
auth,
|
|
||||||
className,
|
|
||||||
where,
|
|
||||||
options,
|
|
||||||
info.clientSDK
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export { getObject, findObjects };
|
export { getObject, findObjects };
|
||||||
|
|||||||
@@ -623,6 +623,10 @@ const PARSE_OBJECT_FIELDS = {
|
|||||||
...CREATE_RESULT_FIELDS,
|
...CREATE_RESULT_FIELDS,
|
||||||
...UPDATE_RESULT_FIELDS,
|
...UPDATE_RESULT_FIELDS,
|
||||||
...INPUT_FIELDS,
|
...INPUT_FIELDS,
|
||||||
|
ACL: {
|
||||||
|
type: new GraphQLNonNull(ACL),
|
||||||
|
resolve: ({ ACL }) => (ACL ? ACL : { '*': { read: true, write: true } }),
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
const PARSE_OBJECT = new GraphQLInterfaceType({
|
const PARSE_OBJECT = new GraphQLInterfaceType({
|
||||||
|
|||||||
@@ -368,7 +368,6 @@ const load = (
|
|||||||
limit: defaultGraphQLTypes.LIMIT_ATT,
|
limit: defaultGraphQLTypes.LIMIT_ATT,
|
||||||
options: defaultGraphQLTypes.READ_OPTIONS_ATT,
|
options: defaultGraphQLTypes.READ_OPTIONS_ATT,
|
||||||
};
|
};
|
||||||
|
|
||||||
const classGraphQLOutputTypeName = `${graphQLClassName}`;
|
const classGraphQLOutputTypeName = `${graphQLClassName}`;
|
||||||
const outputFields = () => {
|
const outputFields = () => {
|
||||||
return classOutputFields.reduce((fields, field) => {
|
return classOutputFields.reduce((fields, field) => {
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ const transformOutputTypeToGraphQL = (
|
|||||||
case 'Bytes':
|
case 'Bytes':
|
||||||
return defaultGraphQLTypes.BYTES;
|
return defaultGraphQLTypes.BYTES;
|
||||||
case 'ACL':
|
case 'ACL':
|
||||||
return defaultGraphQLTypes.ACL;
|
return new GraphQLNonNull(defaultGraphQLTypes.ACL);
|
||||||
default:
|
default:
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user