Skip to content

Commit

Permalink
debug: add log
Browse files Browse the repository at this point in the history
  • Loading branch information
Pascal Klesse committed Aug 16, 2024
1 parent 9b7444f commit 6a07f54
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/runtime/classes/graphql-meta.class.ts
Original file line number Diff line number Diff line change
Expand Up @@ -388,11 +388,12 @@ export class GraphQLMeta {
const graphQLType = GraphQLType.map({
type: this.getTypeName(type),
});

console.log('getDeepType::typeName', typeName);
console.log('getDeepType::graphQLType', graphQLType);
// Check prepared
if (typeof type === 'object') {
const preparedType = prepared[typeName];

console.log('getDeepType::preparedType', preparedType);
// Work with cached type
if (preparedType) {
// Create a new object to protect own isXXX information
Expand All @@ -401,6 +402,8 @@ export class GraphQLMeta {
// But use fields as reference to get future changes via prepared caching
clone.fields = preparedType.fields;

console.log('getDeepType::clone.fields', clone.fields);
console.log('getDeepType::type.type', type.type);
// Check for meta flags
if (type.type) {
if (type.type instanceof GraphQLNonNull) {
Expand Down Expand Up @@ -435,7 +438,7 @@ export class GraphQLMeta {
prepared[type.name] = graphQLType;
}
}

console.log('getDeepType::type.ofType', type.ofType);
// Search deeper
if (type.ofType) {
const ofTypeResult = this.getDeepType(type.ofType, prepared);
Expand All @@ -450,7 +453,7 @@ export class GraphQLMeta {
ofTypeResult.isItemRequired = type.ofType instanceof GraphQLNonNull;
}
}

console.log('getDeepType::assign', graphQLType, ofTypeResult);
Object.assign(graphQLType, ofTypeResult);
return graphQLType;
}
Expand Down

0 comments on commit 6a07f54

Please sign in to comment.