fix: #1286, uses defaultDepth in graphql rich text depth
This commit is contained in:
@@ -117,11 +117,14 @@ function buildObjectType({
|
||||
[field.name]: {
|
||||
type: withNullableType(field, GraphQLJSON, forceNullable),
|
||||
async resolve(parent, args, context) {
|
||||
if (args.depth > 0) {
|
||||
let depth = payload.config.defaultDepth;
|
||||
if (typeof args.depth !== 'undefined') depth = args.depth;
|
||||
|
||||
if (depth > 0) {
|
||||
await createRichTextRelationshipPromise({
|
||||
req: context.req,
|
||||
siblingDoc: parent,
|
||||
depth: args.depth,
|
||||
depth,
|
||||
field,
|
||||
showHiddenFields: false,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user