Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated graphql/generator packages #277

Merged
merged 1 commit into from
Aug 19, 2024
Merged

Conversation

tulsiojha
Copy link
Contributor

@tulsiojha tulsiojha commented Aug 19, 2024

Summary by Sourcery

Reformat the GraphQL type definitions to enhance code readability by adjusting line breaks and indentation without altering the functionality.

Enhancements:

  • Reformat GraphQL type definitions for improved readability by adjusting line breaks and indentation.

Copy link

sourcery-ai bot commented Aug 19, 2024

Reviewer's Guide by Sourcery

This pull request updates the GraphQL schema in the src/generated/gql/server.ts file. The changes primarily involve reformatting and restructuring the existing code without altering its functionality. The main modifications include:

  1. Removing unnecessary line breaks and indentation, resulting in a more compact representation of types and interfaces.
  2. Consolidating multi-line type definitions into single-line definitions where possible.
  3. Simplifying the structure of query and mutation types by removing redundant nesting.
  4. Standardizing the formatting of input types and query/mutation return types.

These changes aim to improve code readability and maintainability without changing the underlying GraphQL schema or its functionality.

File-Level Changes

Files Changes
src/generated/gql/server.ts Removed unnecessary line breaks and indentation in type definitions
src/generated/gql/server.ts Consolidated multi-line type definitions into single-line definitions where possible
src/generated/gql/server.ts Simplified the structure of query and mutation types by removing redundant nesting
src/generated/gql/server.ts Standardized the formatting of input types and query/mutation return types

Tips
  • Trigger a new Sourcery review by commenting @sourcery-ai review on the pull request.
  • Continue your discussion with Sourcery by replying directly to review comments.
  • You can change your review settings at any time by accessing your dashboard:
    • Enable or disable the Sourcery-generated pull request summary or reviewer's guide;
    • Change the review language;
  • You can always contact us if you have any questions or feedback.

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @tulsiojha - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟡 General issues: 1 issue found
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

};
};

export type ConsoleListImportedManagedResourcesQuery = { core_listImportedManagedResources?: { totalCount: number, edges: Array<{ cursor: string, node: { accountName: string, creationTime: any, displayName: string, environmentName: string, id: string, markedForDeletion?: boolean, name: string, recordVersion: number, updateTime: any, createdBy: { userEmail: string, userId: string, userName: string }, lastUpdatedBy: { userEmail: string, userId: string, userName: string }, managedResourceRef: { id: string, name: string, namespace: string }, secretRef: { name: string, namespace?: string }, syncStatus: { action: Github__Com___Kloudlite___Api___Pkg___Types__SyncAction, error?: string, lastSyncedAt?: any, recordVersion: number, state: Github__Com___Kloudlite___Api___Pkg___Types__SyncState, syncScheduledAt?: any }, managedResource?: { accountName: string, apiVersion?: string, clusterName: string, creationTime: any, displayName: string, enabled?: boolean, environmentName: string, id: string, isImported: boolean, kind?: string, managedServiceName: string, markedForDeletion?: boolean, mresRef: string, recordVersion: number, updateTime: any, metadata?: { annotations?: any, creationTimestamp: any, deletionTimestamp?: any, generation: number, labels?: any, name: string, namespace?: string }, spec: { resourceNamePrefix?: string, resourceTemplate: { apiVersion: string, kind: string, spec?: any, msvcRef: { apiVersion?: string, kind?: string, name: string, namespace: string } } }, status?: { checks?: any, isReady: boolean, lastReadyGeneration?: number, lastReconcileTime?: any, checkList?: Array<{ debug?: boolean, description?: string, hide?: boolean, name: string, title: string }>, message?: { RawMessage?: any }, resources?: Array<{ apiVersion: string, kind: string, name: string, namespace: string }> }, syncedOutputSecretRef?: { apiVersion?: string, data?: any, immutable?: boolean, kind?: string, stringData?: any, type?: K8s__Io___Api___Core___V1__SecretType } } } }>, pageInfo: { endCursor?: string, hasNextPage?: boolean, hasPrevPage?: boolean, startCursor?: string } } };
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: Consider adding strategic line breaks to improve readability of complex types

While the more compact style may be intentional, some of the more complex type definitions (like ConsoleListImportedManagedResourcesQuery) could benefit from strategic line breaks. This would maintain the overall compact style while improving readability for the most complex parts. For example, you might consider breaking after each major nested object or array.

export type ConsoleListImportedManagedResourcesQuery = {
  core_listImportedManagedResources?: {
    totalCount: number,
    edges: Array<{
      cursor: string,
      node: {
        accountName: string,
        creationTime: any,
        displayName: string,
        environmentName: string,
        id: string,
        markedForDeletion?: boolean,
        name: string,
        recordVersion: number,
        updateTime: any,
        createdBy: { userEmail: string, userId: string, userName: string },
        lastUpdatedBy: { userEmail: string, userId: string, userName: string },
        managedResourceRef: { id: string, name: string, namespace: string },
        secretRef: { name: string, namespace?: string },
        syncStatus: {
          action: Github__Com___Kloudlite___Api___Pkg___Types__SyncAction,
          error?: string,
          lastSyncedAt?: any,
          recordVersion: number,
          state: Github__Com___Kloudlite___Api___Pkg___Types__SyncState,
          syncScheduledAt?: any
        },
        managedResource?: {
          accountName: string,
          apiVersion?: string,
          clusterName: string,
          creationTime: any,
          displayName: string,
          enabled?: boolean,
          environmentName: string,
          id: string,
          isImported: boolean,
          kind?: string,
          managedServiceName: string,
          markedForDeletion?: boolean,
          mresRef: string,
          recordVersion: number,
          updateTime: any,
          metadata?: {
            annotations?: any,
            creationTimestamp: any,
            deletionTimestamp?: any,
            generation: number,
            labels?: any,
            name: string,
            namespace?: string
          },
          spec: {
            resourceNamePrefix?: string,
            resourceTemplate: {
              apiVersion: string,
              kind: string,
              spec?: any,
              msvcRef: {
                apiVersion?: string,
                kind?: string,
                name: string,
                namespace: string
              }
            }
          },
          status?: {
            checks?: any,
            isReady: boolean,
            lastReadyGeneration?: number,
            lastReconcileTime?: any,
            checkList?: Array<{
              debug?: boolean,
              description?: string,
              hide?: boolean,
              name: string,
              title: string
            }>,
            message?: { RawMessage?: any },
            resources?: Array<{
              apiVersion: string,
              kind: string,
              name: string,
              namespace: string
            }>
          },
          syncedOutputSecretRef?: {
            apiVersion?: string,
            data?: any,
            immutable?: boolean,
            kind?: string,
            stringData?: any,
            type?: K8s__Io___Api___Core___V1__SecretType
          }
        }
      }
    }>,
    pageInfo: {
      endCursor?: string,
      hasNextPage?: boolean,
      hasPrevPage?: boolean,
      startCursor?: string
    }
  }
};

@tulsiojha tulsiojha merged commit baae4f0 into release-v1.0.5 Aug 19, 2024
5 checks passed
@tulsiojha tulsiojha deleted the web-fix/security branch August 20, 2024 04:58
abdheshnayak pushed a commit that referenced this pull request Oct 28, 2024
updated graphql/generator packages
tulsiojha added a commit that referenced this pull request Nov 1, 2024
updated graphql/generator packages
abdheshnayak pushed a commit that referenced this pull request Nov 5, 2024
updated graphql/generator packages
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant