Compare commits
1 Commits
auth-backe
...
solid-urql
| Author | SHA1 | Date | |
|---|---|---|---|
| fbe19ff41d |
@@ -27,6 +27,7 @@
|
||||
"@solidjs/router": "^0.4.3",
|
||||
"@urql/core": "^3.0.3",
|
||||
"graphql": "^16.6.0",
|
||||
"solid-js": "^1.5.1"
|
||||
"solid-js": "^1.5.1",
|
||||
"solid-urql": "^0.2.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,14 @@
|
||||
import type { Component } from "solid-js";
|
||||
import { Provider } from "solid-urql";
|
||||
import client from "./graphql/client";
|
||||
import AppRouter from "./routes";
|
||||
|
||||
const App: Component = () => {
|
||||
return <AppRouter />;
|
||||
return (
|
||||
<Provider value={client}>
|
||||
<AppRouter />
|
||||
</Provider>
|
||||
);
|
||||
};
|
||||
|
||||
export default App;
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import { createClient } from "@urql/core";
|
||||
import { createClient } from "solid-urql";
|
||||
|
||||
const client = createClient({
|
||||
url: ''
|
||||
});
|
||||
url: 'https://hasura.apps.artservis.al/v1/graphql'
|
||||
});
|
||||
|
||||
export default client;
|
||||
@@ -1,10 +1,20 @@
|
||||
import type { Component } from "solid-js";
|
||||
const Register: Component = () => {
|
||||
return (
|
||||
<div>
|
||||
<h2>Register</h2>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
import { useAllUsersQuery } from "../../../graphql/generated/graphql";
|
||||
|
||||
export default Register;
|
||||
const mockHasura = () => {
|
||||
const getUsers = useAllUsersQuery();
|
||||
console.log(getUsers);
|
||||
};
|
||||
|
||||
const Register: Component = () => {
|
||||
|
||||
|
||||
return (
|
||||
<div>
|
||||
<h2>Register</h2>
|
||||
<button onclick={mockHasura}>Mock</button>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default Register;
|
||||
|
||||
@@ -3084,6 +3084,11 @@ solid-refresh@^0.4.1:
|
||||
"@babel/helper-module-imports" "^7.16.7"
|
||||
"@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:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c"
|
||||
|
||||
Reference in New Issue
Block a user