Skip to content

Commit

Permalink
feat: increase asset file fragment depth
Browse files Browse the repository at this point in the history
  • Loading branch information
nourbalaha committed Mar 6, 2024
1 parent 87a12e4 commit 4605da0
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 9 deletions.
19 changes: 17 additions & 2 deletions web/src/gql/fragments/file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ export const assetFileFragment = gql`
}
`;

export const assetFile5Fragment = gql`
fragment assetFile5Fragment on AssetFile {
export const assetFile10Fragment = gql`
fragment assetFile10Fragment on AssetFile {

Check warning on line 13 in web/src/gql/fragments/file.ts

View check run for this annotation

Codecov / codecov/patch

web/src/gql/fragments/file.ts#L12-L13

Added lines #L12 - L13 were not covered by tests
...assetFileFragment
children {
...assetFileFragment
Expand All @@ -22,6 +22,21 @@ export const assetFile5Fragment = gql`
...assetFileFragment
children {
...assetFileFragment
children {
...assetFileFragment
children {
...assetFileFragment
children {
...assetFileFragment
children {
...assetFileFragment
children {
...assetFileFragment
}
}
}
}
}

Check warning on line 39 in web/src/gql/fragments/file.ts

View check run for this annotation

Codecov / codecov/patch

web/src/gql/fragments/file.ts#L25-L39

Added lines #L25 - L39 were not covered by tests
}
}
}
Expand Down
27 changes: 21 additions & 6 deletions web/src/gql/graphql-client-api.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2135,7 +2135,7 @@ export type AssetFragmentFragment = { __typename?: 'Asset', id: string, fileName

export type AssetFileFragmentFragment = { __typename?: 'AssetFile', name: string, size: number, contentType?: string | null, path: string };

export type AssetFile5FragmentFragment = { __typename?: 'AssetFile', name: string, size: number, contentType?: string | null, path: string, children?: Array<{ __typename?: 'AssetFile', name: string, size: number, contentType?: string | null, path: string, children?: Array<{ __typename?: 'AssetFile', name: string, size: number, contentType?: string | null, path: string, children?: Array<{ __typename?: 'AssetFile', name: string, size: number, contentType?: string | null, path: string, children?: Array<{ __typename?: 'AssetFile', name: string, size: number, contentType?: string | null, path: string, children?: Array<{ __typename?: 'AssetFile', name: string, size: number, contentType?: string | null, path: string }> | null }> | null }> | null }> | null }> | null };
export type AssetFile10FragmentFragment = { __typename?: 'AssetFile', name: string, size: number, contentType?: string | null, path: string, children?: Array<{ __typename?: 'AssetFile', name: string, size: number, contentType?: string | null, path: string, children?: Array<{ __typename?: 'AssetFile', name: string, size: number, contentType?: string | null, path: string, children?: Array<{ __typename?: 'AssetFile', name: string, size: number, contentType?: string | null, path: string, children?: Array<{ __typename?: 'AssetFile', name: string, size: number, contentType?: string | null, path: string, children?: Array<{ __typename?: 'AssetFile', name: string, size: number, contentType?: string | null, path: string, children?: Array<{ __typename?: 'AssetFile', name: string, size: number, contentType?: string | null, path: string, children?: Array<{ __typename?: 'AssetFile', name: string, size: number, contentType?: string | null, path: string, children?: Array<{ __typename?: 'AssetFile', name: string, size: number, contentType?: string | null, path: string, children?: Array<{ __typename?: 'AssetFile', name: string, size: number, contentType?: string | null, path: string, children?: Array<{ __typename?: 'AssetFile', name: string, size: number, contentType?: string | null, path: string }> | null }> | null }> | null }> | null }> | null }> | null }> | null }> | null }> | null }> | null };

export type IntegrationFragmentFragment = { __typename?: 'Integration', id: string, name: string, description?: string | null, logoUrl: string, iType: IntegrationType, developerId: string, createdAt: Date, updatedAt: Date, developer: { __typename?: 'User', id: string, name: string, email: string }, config?: { __typename?: 'IntegrationConfig', token: string, webhooks: Array<{ __typename?: 'Webhook', id: string, name: string, url: string, active: boolean, secret: string, createdAt: Date, updatedAt: Date, trigger: { __typename?: 'WebhookTrigger', onItemCreate?: boolean | null, onItemUpdate?: boolean | null, onItemDelete?: boolean | null, onItemPublish?: boolean | null, onItemUnPublish?: boolean | null, onAssetUpload?: boolean | null, onAssetDecompress?: boolean | null, onAssetDelete?: boolean | null } }> } | null };

Expand Down Expand Up @@ -2177,7 +2177,7 @@ export type GetAssetFileQueryVariables = Exact<{
}>;


export type GetAssetFileQuery = { __typename?: 'Query', assetFile: { __typename?: 'AssetFile', name: string, size: number, contentType?: string | null, path: string, children?: Array<{ __typename?: 'AssetFile', name: string, size: number, contentType?: string | null, path: string, children?: Array<{ __typename?: 'AssetFile', name: string, size: number, contentType?: string | null, path: string, children?: Array<{ __typename?: 'AssetFile', name: string, size: number, contentType?: string | null, path: string, children?: Array<{ __typename?: 'AssetFile', name: string, size: number, contentType?: string | null, path: string, children?: Array<{ __typename?: 'AssetFile', name: string, size: number, contentType?: string | null, path: string }> | null }> | null }> | null }> | null }> | null } };
export type GetAssetFileQuery = { __typename?: 'Query', assetFile: { __typename?: 'AssetFile', name: string, size: number, contentType?: string | null, path: string, children?: Array<{ __typename?: 'AssetFile', name: string, size: number, contentType?: string | null, path: string, children?: Array<{ __typename?: 'AssetFile', name: string, size: number, contentType?: string | null, path: string, children?: Array<{ __typename?: 'AssetFile', name: string, size: number, contentType?: string | null, path: string, children?: Array<{ __typename?: 'AssetFile', name: string, size: number, contentType?: string | null, path: string, children?: Array<{ __typename?: 'AssetFile', name: string, size: number, contentType?: string | null, path: string, children?: Array<{ __typename?: 'AssetFile', name: string, size: number, contentType?: string | null, path: string, children?: Array<{ __typename?: 'AssetFile', name: string, size: number, contentType?: string | null, path: string, children?: Array<{ __typename?: 'AssetFile', name: string, size: number, contentType?: string | null, path: string, children?: Array<{ __typename?: 'AssetFile', name: string, size: number, contentType?: string | null, path: string, children?: Array<{ __typename?: 'AssetFile', name: string, size: number, contentType?: string | null, path: string }> | null }> | null }> | null }> | null }> | null }> | null }> | null }> | null }> | null }> | null } };

export type GetAssetItemQueryVariables = Exact<{
assetId: Scalars['ID'];
Expand Down Expand Up @@ -2948,8 +2948,8 @@ export const AssetFileFragmentFragmentDoc = gql`
path
}
`;
export const AssetFile5FragmentFragmentDoc = gql`
fragment assetFile5Fragment on AssetFile {
export const AssetFile10FragmentFragmentDoc = gql`
fragment assetFile10Fragment on AssetFile {
...assetFileFragment
children {
...assetFileFragment
Expand All @@ -2961,6 +2961,21 @@ export const AssetFile5FragmentFragmentDoc = gql`
...assetFileFragment
children {
...assetFileFragment
children {
...assetFileFragment
children {
...assetFileFragment
children {
...assetFileFragment
children {
...assetFileFragment
children {
...assetFileFragment
}
}
}
}
}
}
}
}
Expand Down Expand Up @@ -3249,10 +3264,10 @@ export type GetAssetQueryResult = Apollo.QueryResult<GetAssetQuery, GetAssetQuer
export const GetAssetFileDocument = gql`
query GetAssetFile($assetId: ID!) {
assetFile(assetId: $assetId) {
...assetFile5Fragment
...assetFile10Fragment
}
}
${AssetFile5FragmentFragmentDoc}`;
${AssetFile10FragmentFragmentDoc}`;

/**
* __useGetAssetFileQuery__
Expand Down
2 changes: 1 addition & 1 deletion web/src/gql/queries/assets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export const GET_ASSET = gql`
export const GET_ASSET_FILE = gql`
query GetAssetFile($assetId: ID!) {
assetFile(assetId: $assetId) {
...assetFile5Fragment
...assetFile10Fragment

Check warning on line 57 in web/src/gql/queries/assets.ts

View check run for this annotation

Codecov / codecov/patch

web/src/gql/queries/assets.ts#L57

Added line #L57 was not covered by tests
}
}
`;
Expand Down

0 comments on commit 4605da0

Please sign in to comment.