Skip to content

Commit

Permalink
🐛 fix: path resolution bug
Browse files Browse the repository at this point in the history
  • Loading branch information
nberlette committed Jul 10, 2022
1 parent 6f10ea6 commit 60dd7b4
Show file tree
Hide file tree
Showing 12 changed files with 19 additions and 16 deletions.
2 changes: 1 addition & 1 deletion lib/document.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
GraphQLObjectType,
type GraphQLObjectTypeConfig,
GraphQLString,
} from "~/deps.ts";
} from "../deps.ts";
import { shared } from "./shared.ts";
import { TNode } from "./node.ts";
import { getAttributeOfElement } from "./helpers.ts";
Expand Down
2 changes: 1 addition & 1 deletion lib/element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
type GraphQLObjectTypeConfig,
GraphQLString,
PQueue,
} from "~/deps.ts";
} from "../deps.ts";
import { getAttributeOfElement, resolveURL } from "./helpers.ts";
import { TNode } from "./node.ts";
import { TDocument } from "./document.ts";
Expand Down
2 changes: 1 addition & 1 deletion lib/helpers.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Element } from "~/deps.ts";
import { Element } from "../deps.ts";

export function getAttributeOfElement(element: Element, name: string) {
const attribute = element.getAttribute(name);
Expand Down
2 changes: 1 addition & 1 deletion lib/node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
Element,
GraphQLInterfaceType,
type GraphQLInterfaceTypeConfig,
} from "~/deps.ts";
} from "../deps.ts";
import { shared } from "./shared.ts";

export const TNode = new GraphQLInterfaceType({
Expand Down
2 changes: 1 addition & 1 deletion lib/query.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { graphql, PQueue } from "~/deps.ts";
import { graphql, PQueue } from "../deps.ts";
import { State } from "./state.ts";
import { schema } from "./schema.ts";

Expand Down
2 changes: 1 addition & 1 deletion lib/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
type GraphQLObjectTypeConfig,
GraphQLSchema,
GraphQLString,
} from "~/deps.ts";
} from "../deps.ts";
import { TDocument } from "./document.ts";

export const schema = new GraphQLSchema({
Expand Down
2 changes: 1 addition & 1 deletion lib/selector.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { GraphQLString } from "~/deps.ts";
import { GraphQLString } from "../deps.ts";

export const selector = {
type: GraphQLString,
Expand Down
2 changes: 1 addition & 1 deletion lib/server.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { serve } from "~/deps.ts";
import { serve } from "../deps.ts";
import { useQuery } from "./query.ts";

export const prismqlPlayground = (_port: string | number, endpoint: string) => {
Expand Down
2 changes: 1 addition & 1 deletion lib/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
GraphQLList,
GraphQLNonNull,
GraphQLString,
} from "~/deps.ts";
} from "../deps.ts";
import { selector } from "./selector.ts";
import { getAttributeOfElement } from "./helpers.ts";
import { TElement } from "./element.ts";
Expand Down
4 changes: 2 additions & 2 deletions serve.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env deno run --allow-net --unstable
import { createServer } from "~/mod.ts";
import { parse } from "std/flags/mod.ts";
import { createServer } from "./mod.ts";
import { parse } from "https://deno.land/std@0.145.0/flags/mod.ts";

const { port = 8080 } = parse(Deno.args) ?? {};
createServer(port);
11 changes: 7 additions & 4 deletions tests/deps.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
export { assertEquals, assertNotEquals } from "std/testing/asserts.ts";
export { resolveURL } from "~/lib/helpers.ts";
export { State } from "~/lib/state.ts";
export { useQuery } from "~/mod.ts";
export {
assertEquals,
assertNotEquals,
} from "https://deno.land/std@0.145.0/testing/asserts.ts";
export { resolveURL } from "../lib/helpers.ts";
export { State } from "../lib/state.ts";
export { useQuery } from "../mod.ts";
2 changes: 1 addition & 1 deletion tests/utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Deno.test("state #4", () => {
});

Deno.test("state null and undefined #5", () => {
const state = new State<null>();
const state = new State();

state.set("test-state-1", null);
state.set("test-state-2", undefined);
Expand Down

0 comments on commit 60dd7b4

Please sign in to comment.