introduce utils and modules folders

master
Peter Babič 5 years ago
parent b88925f065
commit 7f47152375
Signed by: peter.babic
GPG Key ID: 4BB075BC1884BA40
  1. 2
      src/app.ts
  2. 0
      src/modules/User.ts
  3. 4
      src/modules/User/UserResolver.spec.ts
  4. 0
      src/modules/User/UserResolver.ts
  5. 0
      src/utils/callSchema.ts
  6. 2
      src/utils/createSchema.ts

@ -1,6 +1,6 @@
import { ApolloServer } from "apollo-server";
import { buildSchema } from "type-graphql";
import { UserResolver } from "./User/UserResolver";
import { UserResolver } from "./modules/User/UserResolver";
const PORT = process.env.PORT || 4000

@ -1,4 +1,4 @@
import { callSchema } from "../callSchema";
import { callSchema } from "../../utils/callSchema";
const usersQuery = `
query {
@ -8,7 +8,7 @@ query {
}`
describe("user resolver", () => {
it("should return an empty array when no users are in sample", async () => {
it("should return an empty array when no users are created", async () => {
const response = await callSchema({
source: usersQuery,
})

@ -1,5 +1,5 @@
import { buildSchema } from "type-graphql";
import { UserResolver } from "./User/UserResolver";
import { UserResolver } from "../modules/User/UserResolver";
export const createSchema = () =>
buildSchema({
Loading…
Cancel
Save