Skip to content

Commit

Permalink
Drop deprecated short-lived downloadUrl field (#3061)
Browse files Browse the repository at this point in the history
  • Loading branch information
CarsonF committed May 22, 2024
1 parent 67c7170 commit 60f22ea
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 28 deletions.
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

0 comments on commit 60f22ea

Please sign in to comment.