Skip to content

Commit 883af9c

Browse files
committedApr 6, 2018
fix(format): customFieldResolver.ts
1 parent 1208516 commit 883af9c

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed
 

Diff for: ‎src/customFieldResolver.ts

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
const customFieldResolver = (source, args, context, info) => {
22
// ensure source is a value for which property access is acceptable.
3-
if (typeof source === "object" || typeof source === "function") {
3+
if (typeof source === 'object' || typeof source === 'function') {
44
const property =
55
source[
66
info.fieldNodes[0].alias
77
? info.fieldNodes[0].alias.value
88
: info.fieldName
9-
];
10-
if (typeof property === "function") {
11-
return source[info.fieldName](args, context, info);
9+
]
10+
if (typeof property === 'function') {
11+
return source[info.fieldName](args, context, info)
1212
}
13-
return property;
13+
return property
1414
}
15-
};
15+
}
1616

17-
export default customFieldResolver;
18-
export { customFieldResolver };
17+
export default customFieldResolver
18+
export { customFieldResolver }

0 commit comments

Comments
 (0)