diff --git a/example/.fluentci/mod.ts b/example/.fluentci/mod.ts index 52470dd..fbc1f17 100644 --- a/example/.fluentci/mod.ts +++ b/example/.fluentci/mod.ts @@ -1,3 +1 @@ export * from "./src/dagger/index.ts"; -export * as queries from "./src/dagger/queries.ts"; -export { schema } from "./src/dagger/schema.ts"; diff --git a/example/.fluentci/src/dagger/queries.ts b/example/.fluentci/src/dagger/queries.ts deleted file mode 100644 index ab7ce92..0000000 --- a/example/.fluentci/src/dagger/queries.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { gql } from "../../deps.ts"; - -export const config = gql` - query config($src: String!, $exitCode: Int!) { - config(src: $src, exitCode: $exitCode) - } -`; - -export const fs = gql` - query fs($src: String!, $exitCode: Int!) { - fs(src: $src, exitCode: $exitCode) - } -`; - -export const repo = gql` - query repo($src: String!, $exitCode: Int!, $repoUrl: String!) { - repo(src: $src, exitCode: $exitCode, repoUrl: $repoUrl) - } -`; - -export const image = gql` - query image($src: String!, $exitCode: Int!, $image: String!) { - image(src: $src, exitCode: $exitCode, image: $image) - } -`; - -export const sbom = gql` - query sbom($src: String!, $exitCode: Int!, $path: String!) { - sbom(src: $src, exitCode: $exitCode, path: $path) - } -`; diff --git a/example/.fluentci/src/dagger/schema.ts b/example/.fluentci/src/dagger/schema.ts deleted file mode 100644 index c98a692..0000000 --- a/example/.fluentci/src/dagger/schema.ts +++ /dev/null @@ -1,67 +0,0 @@ -import { - queryType, - makeSchema, - dirname, - join, - resolve, - stringArg, - nonNull, - intArg, -} from "../../deps.ts"; - -import { config, fs, repo, image, sbom } from "./jobs.ts"; - -const Query = queryType({ - definition(t) { - t.string("config", { - args: { - src: nonNull(stringArg()), - exitCode: nonNull(intArg()), - }, - resolve: async (_root, args, _ctx) => - await config(args.src, args.exitCode), - }); - t.string("fs", { - args: { - src: nonNull(stringArg()), - exitCode: nonNull(intArg()), - }, - resolve: async (_root, args, _ctx) => await fs(args.src, args.exitCode), - }); - t.string("repo", { - args: { - src: nonNull(stringArg()), - exitCode: nonNull(intArg()), - repoUrl: nonNull(stringArg()), - }, - resolve: async (_root, args, _ctx) => - await repo(args.src, args.exitCode, args.repoUrl), - }); - t.string("image", { - args: { - src: nonNull(stringArg()), - exitCode: nonNull(intArg()), - image: nonNull(stringArg()), - }, - resolve: async (_root, args, _ctx) => - await image(args.src, args.exitCode, args.image), - }); - t.string("sbom", { - args: { - src: nonNull(stringArg()), - exitCode: nonNull(intArg()), - path: nonNull(stringArg()), - }, - resolve: async (_root, args, _ctx) => - await sbom(args.src, args.exitCode, args.path), - }); - }, -}); - -export const schema = makeSchema({ - types: [Query], - outputs: { - schema: resolve(join(dirname(".."), dirname(".."), "schema.graphql")), - typegen: resolve(join(dirname(".."), dirname(".."), "gen", "nexus.ts")), - }, -});