Skip to content

Commit

Permalink
bump std & examples
Browse files Browse the repository at this point in the history
  • Loading branch information
v1rtl committed Jul 5, 2021
1 parent 748360a commit 47cb130
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 15 deletions.
11 changes: 4 additions & 7 deletions examples/opine.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { opine, Request } from 'https://deno.land/x/opine@1.5.3/mod.ts'
import { opine, Request } from 'https://deno.land/x/opine@1.5.4/mod.ts'
import { GraphQLHTTP } from '../mod.ts'
import { makeExecutableSchema } from 'https://deno.land/x/graphql_tools/mod.ts'
import { gql } from 'https://deno.land/x/graphql_tag/mod.ts'
import { makeExecutableSchema } from 'https://deno.land/x/graphql_tools@0.0.1/mod.ts'
import { gql } from 'https://deno.land/x/graphql_tag@0.0.1/mod.ts'

const typeDefs = gql`
type Query {
Expand All @@ -22,8 +22,5 @@ const schema = makeExecutableSchema({ resolvers, typeDefs })
const app = opine()

app
.use(
'/graphql',
GraphQLHTTP<Request>({ schema, context: (request) => ({ request }), graphiql: true })
)
.use('/graphql', GraphQLHTTP<Request>({ schema, context: (request) => ({ request }), graphiql: true }))
.listen(3000, () => console.log(`☁ Started on http://localhost:3000`))
2 changes: 1 addition & 1 deletion examples/tinyhttp.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { App } from 'https://deno.land/x/tinyhttp@0.1.13/mod.ts'
import { App } from 'https://deno.land/x/tinyhttp@0.1.14/mod.ts'
import { GraphQLHTTP } from '../mod.ts'
import { makeExecutableSchema } from 'https://deno.land/x/graphql_tools@0.0.1/mod.ts'
import { gql } from 'https://deno.land/x/graphql_tag@0.0.1/mod.ts'
Expand Down
6 changes: 3 additions & 3 deletions examples/vanilla.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { serve } from 'https://deno.land/std@0.99.0/http/server.ts'
import { serve } from 'https://deno.land/std@0.100.0/http/server.ts'
import { GraphQLHTTP } from '../mod.ts'
import { makeExecutableSchema } from 'https://deno.land/x/graphql_tools/mod.ts'
import { gql } from 'https://deno.land/x/graphql_tag/mod.ts'
import { makeExecutableSchema } from 'https://deno.land/x/graphql_tools@0.0.1/mod.ts'
import { gql } from 'https://deno.land/x/graphql_tag@0.0.1/mod.ts'

const typeDefs = gql`
type Query {
Expand Down
2 changes: 1 addition & 1 deletion http.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Request } from './types.ts'
import { runHttpQuery, GraphQLOptions } from './common.ts'
import { readAll } from 'https://deno.land/std@0.99.0/io/util.ts'
import { readAll } from 'https://deno.land/std@0.100.0/io/util.ts'

const dec = new TextDecoder()

Expand Down
4 changes: 2 additions & 2 deletions mod_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { GraphQLHTTP } from './http.ts'
import { runHttpQuery } from './common.ts'
import { buildSchema } from 'https://deno.land/x/graphql_deno@v15.0.0/mod.ts'
import { describe, it, expect, run } from 'https://deno.land/x/tincan@0.2.1/mod.ts'
import { ServerRequest } from 'https://deno.land/std@0.99.0/http/server.ts'
import { ServerRequest } from 'https://deno.land/std@0.100.0/http/server.ts'

const schema = buildSchema(`
type Query {
Expand Down Expand Up @@ -41,7 +41,7 @@ describe('GraphQLHTTP(opts)', () => {

const app = GraphQLHTTP<ServerRequest, Context>({
schema,
fieldResolver: (_, __, ctx: Context, info) => {
fieldResolver: (_: any, __: any, ctx: Context, info: any) => {
if (info.fieldName === 'hello') {
return `Request from ${ctx.request.url}`
}
Expand Down
2 changes: 1 addition & 1 deletion types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ServerRequest } from 'https://deno.land/std@0.99.0/http/server.ts'
import { ServerRequest } from 'https://deno.land/std@0.100.0/http/server.ts'

/**
* Request type with only required properties
Expand Down

0 comments on commit 47cb130

Please sign in to comment.