1 Commits

Author SHA1 Message Date
fbe19ff41d Stale 2022-09-04 20:31:25 +02:00
6 changed files with 37 additions and 13 deletions

0
-I Normal file
View File

View File

@@ -27,6 +27,7 @@
"@solidjs/router": "^0.4.3", "@solidjs/router": "^0.4.3",
"@urql/core": "^3.0.3", "@urql/core": "^3.0.3",
"graphql": "^16.6.0", "graphql": "^16.6.0",
"solid-js": "^1.5.1" "solid-js": "^1.5.1",
"solid-urql": "^0.2.0"
} }
} }

View File

@@ -1,8 +1,14 @@
import type { Component } from "solid-js"; import type { Component } from "solid-js";
import { Provider } from "solid-urql";
import client from "./graphql/client";
import AppRouter from "./routes"; import AppRouter from "./routes";
const App: Component = () => { const App: Component = () => {
return <AppRouter />; return (
<Provider value={client}>
<AppRouter />
</Provider>
);
}; };
export default App; export default App;

View File

@@ -1,5 +1,7 @@
import { createClient } from "@urql/core"; import { createClient } from "solid-urql";
const client = createClient({ const client = createClient({
url: '' url: 'https://hasura.apps.artservis.al/v1/graphql'
}); });
export default client;

View File

@@ -1,10 +1,20 @@
import type { Component } from "solid-js"; import type { Component } from "solid-js";
import { useAllUsersQuery } from "../../../graphql/generated/graphql";
const mockHasura = () => {
const getUsers = useAllUsersQuery();
console.log(getUsers);
};
const Register: Component = () => { const Register: Component = () => {
return (
<div>
<h2>Register</h2> return (
</div> <div>
) <h2>Register</h2>
} <button onclick={mockHasura}>Mock</button>
</div>
);
};
export default Register; export default Register;

View File

@@ -3084,6 +3084,11 @@ solid-refresh@^0.4.1:
"@babel/helper-module-imports" "^7.16.7" "@babel/helper-module-imports" "^7.16.7"
"@babel/types" "^7.18.4" "@babel/types" "^7.18.4"
solid-urql@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/solid-urql/-/solid-urql-0.2.0.tgz#b6305480a4e46d176a195a4bc586291e19944a7a"
integrity sha512-3sLtHBbbfwANBTP0toZLdVeRKa4UJDBjgfP5rv2z4ip4+a8vBlfFHWy/5N6fgxBhQ0IdbuYKRAcJECkJd80auw==
source-map-js@^1.0.2: source-map-js@^1.0.2:
version "1.0.2" version "1.0.2"
resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c" resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c"