update header x-apollo-operation-name
This commit is contained in:
Submodule epess-database updated: 47429d7def...002e6c792f
@@ -37,7 +37,7 @@ export class UploadedFileSchema extends PothosSchema {
|
|||||||
@Pothos()
|
@Pothos()
|
||||||
init(): void {
|
init(): void {
|
||||||
this.builder.queryFields((t) => ({
|
this.builder.queryFields((t) => ({
|
||||||
uploadedDocument: t.prismaField({
|
uploadedFile: t.prismaField({
|
||||||
type: this.uploadedFile(),
|
type: this.uploadedFile(),
|
||||||
args: this.builder.generator.findUniqueArgs('UploadedFile'),
|
args: this.builder.generator.findUniqueArgs('UploadedFile'),
|
||||||
resolve: async (query, root, args, ctx, info) => {
|
resolve: async (query, root, args, ctx, info) => {
|
||||||
@@ -59,7 +59,7 @@ export class UploadedFileSchema extends PothosSchema {
|
|||||||
return file;
|
return file;
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
uploadedDocuments: t.prismaField({
|
uploadedFiles: t.prismaField({
|
||||||
type: [this.uploadedFile()],
|
type: [this.uploadedFile()],
|
||||||
args: this.builder.generator.findManyArgs('UploadedFile'),
|
args: this.builder.generator.findManyArgs('UploadedFile'),
|
||||||
resolve: async (query, root, args, ctx, info) => {
|
resolve: async (query, root, args, ctx, info) => {
|
||||||
|
|||||||
@@ -10,7 +10,11 @@ async function bootstrap() {
|
|||||||
app.enableCors({
|
app.enableCors({
|
||||||
origin: corsOrigin,
|
origin: corsOrigin,
|
||||||
methods: ['GET', 'POST', 'PUT', 'DELETE', 'PATCH', 'OPTIONS'],
|
methods: ['GET', 'POST', 'PUT', 'DELETE', 'PATCH', 'OPTIONS'],
|
||||||
allowedHeaders: ['Content-Type', 'Authorization'],
|
allowedHeaders: [
|
||||||
|
'Content-Type',
|
||||||
|
'Authorization',
|
||||||
|
'x-apollo-operation-name',
|
||||||
|
],
|
||||||
credentials: true,
|
credentials: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user