Run Prettier JS (#6795)

This commit is contained in:
Diamond Lewis
2020-07-13 13:06:52 -05:00
committed by GitHub
parent ebb0727793
commit e6a6354b29
47 changed files with 313 additions and 329 deletions

View File

@@ -46,7 +46,7 @@ class ParseGraphQLServer {
config: req.config,
auth: req.auth,
},
formatError: error => {
formatError: (error) => {
// Allow to console.log here to debug
return error;
},
@@ -91,7 +91,7 @@ class ParseGraphQLServer {
app.use(this.config.graphQLPath, handleParseErrors);
app.use(
this.config.graphQLPath,
graphqlExpress(async req => await this._getGraphQLOptions(req))
graphqlExpress(async (req) => await this._getGraphQLOptions(req))
);
}

View File

@@ -22,13 +22,13 @@ export function toGraphQLError(error) {
return new ApolloError(message, code);
}
export const extractKeysAndInclude = selectedFields => {
export const extractKeysAndInclude = (selectedFields) => {
selectedFields = selectedFields.filter(
field => !field.includes('__typename')
(field) => !field.includes('__typename')
);
// Handles "id" field for both current and included objects
selectedFields = selectedFields.map(field => {
selectedFields = selectedFields.map((field) => {
if (field === 'id') return 'objectId';
return field.endsWith('.id')
? `${field.substring(0, field.lastIndexOf('.id'))}.objectId`
@@ -57,6 +57,6 @@ export const extractKeysAndInclude = selectedFields => {
return { keys, include };
};
export const getParseClassMutationConfig = function(parseClassConfig) {
export const getParseClassMutationConfig = function (parseClassConfig) {
return (parseClassConfig && parseClassConfig.mutation) || {};
};