Skip to content

Commit

Permalink
remove unnecessary shcema part
Browse files Browse the repository at this point in the history
  • Loading branch information
EmrysMyrddin committed Jul 3, 2023
1 parent 99161f8 commit 6157f4e
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions examples/express-helmet/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,34 +6,14 @@ export function buildApp(app: ReturnType<typeof express>) {
const graphQLServer = createYoga({
schema: createSchema({
typeDefs: /* GraphQL */ `
scalar File
type Query {
hello: String
}
type Mutation {
getFileName(file: File!): String
}
type Subscription {
countdown(from: Int!): Int!
}
`,
resolvers: {
Query: {
hello: () => 'world',
},
Mutation: {
getFileName: (root, { file }: { file: File }) => file.name,
},
Subscription: {
countdown: {
async *subscribe(_, { from }) {
for (let i = from; i >= 0; i--) {
await new Promise((resolve) => setTimeout(resolve, 1000))
yield { countdown: i }
}
},
},
},
},
}),
logging: false,
Expand Down

0 comments on commit 6157f4e

Please sign in to comment.