Tony Won
input ArticlesWhereInput {
_id: String
user: String
OR: [ArticlesWhereInput!]
}
Tony Won
Tony Won
Hyeseong Kim
11/16/2020, 2:08 PMTony Won
Tony Won
Hyeseong Kim
11/16/2020, 2:15 PMTony Won
input ArticlesWhereInput {
_id: String
type: String
OR: [ArticlesWhereInput!]
}
요런식으로 쓰고있어용 ㅋㅋTony Won
{
articles(where: {
_id: "...",
OR: [
{ _id: "..." },
{ type: "business" }
]
}) {
_id
}
}
Hyeseong Kim
11/16/2020, 2:17 PMHyeseong Kim
11/16/2020, 2:20 PMTony Won
Hyeseong Kim
11/16/2020, 2:38 PMtype Query {
articles: [Article!]! @filter(by: ["_id", "type"])
}
Hyeseong Kim
11/16/2020, 2:39 PMinput ArticleFilterInput {
...
OR: [ArticleFilterInputOrInput!]
}
input ArticleFilterInputOrInput {
...
}
이렇게 찍으면 되는거 아닌가용Tony Won
Tony Won
Tony Won
Hyeseong Kim
11/16/2020, 4:06 PMHyeseong Kim
11/16/2020, 4:06 PMHyeseong Kim
11/16/2020, 4:07 PMHyeseong Kim
11/16/2020, 4:07 PMHyeseong Kim
11/16/2020, 4:07 PMTony Won
Tony Won
Hyeseong Kim
11/17/2020, 2:49 AMHyeseong Kim
11/17/2020, 2:49 AMHyeseong Kim
11/17/2020, 2:49 AMHyeseong Kim
11/17/2020, 2:51 AMimport { makeExecutableSchema } from '@graphql-tools/schema';
import typeDefs from '@devsisters/web-swt-graphql/schema';
const OUTPUT_PATH = resolve(process.cwd(), 'shared/graphql/schema/executable-schema.graphql');
const schema = makeExecutableSchema({
typeDefs,
schemaDirectives: {
constraint: ConstraintDirective,
formatDate: FormatDateDirective,
formatDuration: FormatDurationDirective,
pagination: PaginationDirective,
// ...
},
});
writeFileSync(OUTPUT_PATH, printSchema(schema), {
encoding: 'utf-8',
flag: 'w',
});
Hyeseong Kim
11/17/2020, 2:52 AMHyeseong Kim
11/17/2020, 2:52 AM