Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error you sample #34

Open
bobwatcherx opened this issue Aug 21, 2022 · 0 comments
Open

error you sample #34

bobwatcherx opened this issue Aug 21, 2022 · 0 comments

Comments

@bobwatcherx
Copy link

i have eror in deno 1.24 version
sample code :

import { applyGraphQL } from "https://deno.land/x/grapherr/applyGQL.ts";
import { Application, Router } from "https://deno.land/x/oak/mod.ts";
import { gql } from 'https://deno.land/x/graphql_tag/mod.ts';

const app = new Application();

// Define the GQL schema using GraphQL-tag (gql). More information on GraphQL-tag below in the README.
const typeDefs = gql`
  type Query {
    allUsers: [User!]!
  }
  type User {
    _id: ID!
    username: String!
    password: String!
  }
`;

// Define resolvers
const resolvers = {
  Query: {
    allUsers: () => {
      return [
      { _id: 1, username: 'JohnDoe', password: 'Password123!' }, 
      { _id: 2, username: 'JaneDoe', password: 'Password1234!!' }
      ]
    },
  },
};

const GraphQLService = await applyGraphQL<Router>({
  Router,
  typeDefs: typeDefs,
  resolvers: resolvers,
})

app.use(GraphQLService.routes(), GraphQLService.allowedMethods());

await app.listen({ port: 3000 });
console.log("jalan 3000")

error message:

Warning Implicitly using latest version (0.152.0) for https://deno.land/std/mime/multipart.ts
Download https://deno.land/std@0.152.0/mime/multipart.ts
error: Module not found "https://deno.land/std/mime/multipart.ts".
    at https://deno.land/x/oak_graphql@0.6.3/deps.ts:144:33
[E] [daem] app crashed - waiting for file changes before starting ...

run : deno run -A server.ts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant