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;
|
||||
}
|
||||
|
||||
return await rest.find(
|
||||
config,
|
||||
auth,
|
||||
className,
|
||||
where,
|
||||
options,
|
||||
info.clientSDK
|
||||
);
|
||||
return rest.find(config, auth, className, where, options, info.clientSDK);
|
||||
};
|
||||
|
||||
export { getObject, findObjects };
|
||||
|
||||
@@ -623,6 +623,10 @@ const PARSE_OBJECT_FIELDS = {
|
||||
...CREATE_RESULT_FIELDS,
|
||||
...UPDATE_RESULT_FIELDS,
|
||||
...INPUT_FIELDS,
|
||||
ACL: {
|
||||
type: new GraphQLNonNull(ACL),
|
||||
resolve: ({ ACL }) => (ACL ? ACL : { '*': { read: true, write: true } }),
|
||||
},
|
||||
};
|
||||
|
||||
const PARSE_OBJECT = new GraphQLInterfaceType({
|
||||
|
||||
@@ -368,7 +368,6 @@ const load = (
|
||||
limit: defaultGraphQLTypes.LIMIT_ATT,
|
||||
options: defaultGraphQLTypes.READ_OPTIONS_ATT,
|
||||
};
|
||||
|
||||
const classGraphQLOutputTypeName = `${graphQLClassName}`;
|
||||
const outputFields = () => {
|
||||
return classOutputFields.reduce((fields, field) => {
|
||||
|
||||
@@ -56,7 +56,7 @@ const transformOutputTypeToGraphQL = (
|
||||
case 'Bytes':
|
||||
return defaultGraphQLTypes.BYTES;
|
||||
case 'ACL':
|
||||
return defaultGraphQLTypes.ACL;
|
||||
return new GraphQLNonNull(defaultGraphQLTypes.ACL);
|
||||
default:
|
||||
return undefined;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user