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

Drop deprecated short-lived downloadUrl field #3061

Merged
merged 1 commit into from
May 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 1 addition & 15 deletions src/components/file/file-version.resolver.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import { Parent, ResolveField, Resolver } from '@nestjs/graphql';
import { stripIndent } from 'common-tags';
import { URL } from 'url';
import { Parent, Resolver } from '@nestjs/graphql';
import { FileVersion } from './dto';
import * as FileUrl from './file-url.resolver-util';
import { FileService } from './file.service';
Expand All @@ -16,16 +14,4 @@ export class FileVersionResolver {
) {
return await this.service.getUrl(node, download);
}

@ResolveField(() => URL, {
description: 'A direct url to download the file version',
deprecationReason: stripIndent`
Use \`url\` instead.

Note while this url is anonymous, the new field, \`url\` is not.
`,
})
downloadUrl(@Parent() node: FileVersion): Promise<string> {
return this.service.getDownloadUrl(node);
}
}
13 changes: 0 additions & 13 deletions src/components/file/file.resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import {
Resolver,
} from '@nestjs/graphql';
import { stripIndent } from 'common-tags';
import { URL } from 'url';
import {
AnonSession,
ID,
Expand Down Expand Up @@ -82,18 +81,6 @@ export class FileResolver {
return await this.service.getUrl(node, download);
}

@ResolveField(() => URL, {
description: 'A direct url to download the file',
deprecationReason: stripIndent`
Use \`url\` instead.

Note while this url is anonymous, the new field, \`url\` is not.
`,
})
downloadUrl(@Parent() node: File): Promise<string> {
return this.service.getDownloadUrl(node);
}

@Mutation(() => DeleteFileNodeOutput, {
description: 'Delete a file node',
})
Expand Down
Loading