Run Prettier JS (#6795)
This commit is contained in:
@@ -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))
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -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) || {};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user