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 55e7bfe commit 95d0d3c
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 18 deletions.
7 changes: 0 additions & 7 deletions src/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,6 @@ export async function generateComposables(meta: GraphQLMeta): Promise<string> {
const inputFieldsType = types.returnType.replace('[]', '');
const returnTypeIsDefaultType = defaultTypes.includes(types.returnType.toLowerCase());

console.log('inputFieldsType', inputFieldsType);
console.log('returnTypeIsDefaultType', returnTypeIsDefaultType);

template.push(
`export const use${capitalizeFirstLetter(query)}Query = (${
types.argType ? 'variables: { ' + types.argType + ' },' : ''
Expand Down Expand Up @@ -143,8 +140,6 @@ export async function generateComposables(meta: GraphQLMeta): Promise<string> {
}
}

console.log('customTypes', customTypes);

customTypes = [...new Set([].concat(...customTypes))];

// Remove type upload
Expand Down Expand Up @@ -215,8 +210,6 @@ export async function generateFiles(options: any, logger: any, nuxt: any, resolv
// Generate composable types
const composables = await generateComposables(meta);

console.log('composables', composables);

addTemplate({
filename: nuxt.options.rootDir + '/src/base/index.ts',
getContents: () => composables || '',
Expand Down
10 changes: 0 additions & 10 deletions src/runtime/classes/graphql-meta.class.ts
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,6 @@ export class GraphQLMeta {
* Get deep type data
*/
protected getDeepType(type: any, prepared: Record<string, any> = {}): GraphQLType {
console.log('getDeepType::type');
try {
// Check if type is undefined or null
if (!type) {
Expand Down Expand Up @@ -499,16 +498,7 @@ export class GraphQLMeta {

// Set enum values
if (type._values) {
console.log('getDeepType::_values', type);
console.log('getDeepType::_values', typeName);
graphQLType.isEnum = true;
console.log('getDeepType::type._values', type._values);
console.log('getDeepType::type._nameLookup', type._nameLookup);
for (const [key, value] of Object.entries(type._nameLookup)) {
if (!(value as any).isDeprecated) {
graphQLType.validEnums.push(key);
}
}
}

// Finish
Expand Down
1 change: 0 additions & 1 deletion src/runtime/classes/graphql-type.class.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,4 @@ export class GraphQLType extends Standard {
isItemRequired = false;
isList = false;
isEnum = false;
validEnums: string[] = [];
}

0 comments on commit 95d0d3c

Please sign in to comment.