hasura / elm-graphql Goto Github PK
View Code? Open in Web Editor NEWSimple todo app using Hasura GraphQL Engine and dillonkearns/elm-graphql
Simple todo app using Hasura GraphQL Engine and dillonkearns/elm-graphql
Doing this on an unmodified repo at 5d978d9. Ran using my local node and discovered the problem. Verified by building with docker docker run -exec -ti -v $(pwd):/node_app node:12 bash -- same issue.
Here are the error-y parts of the verbose log
33230 silly saveTree | | | `-- [email protected]
33230 silly saveTree | | `-- [email protected]
33230 silly saveTree | `-- [email protected]
33230 silly saveTree `-- [email protected]
33231 warn [email protected] No repository field.
33232 warn optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
33233 warn notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
33234 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid OS: darwin
33234 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid Arch: any
33234 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual OS: linux
33234 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual Arch: x64
33235 warn optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/elm-test/node_modules/chokidar/node_modules/fsevents):
33236 warn notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
33237 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid OS: darwin
33237 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid Arch: any
33237 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual OS: linux
33237 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual Arch: x64
33238 warn optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/elm-test/node_modules/fsevents):
33239 warn notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
33240 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid OS: darwin
33240 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid Arch: any
33240 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual OS: linux
33240 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual Arch: x64
33241 verbose stack Error: [email protected] install: `binwrap-install`
33241 verbose stack Exit status 1
33241 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
33241 verbose stack at EventEmitter.emit (events.js:196:13)
33241 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
33241 verbose stack at ChildProcess.emit (events.js:196:13)
33241 verbose stack at maybeClose (internal/child_process.js:1011:16)
33241 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:268:5)
33242 verbose pkgid [email protected]
33243 verbose cwd /node_app
33244 verbose Linux 4.9.93-boot2docker
33245 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "i"
33246 verbose node v12.2.0
33247 verbose npm v6.9.0
33248 error code ELIFECYCLE
33249 error errno 1
33250 error [email protected] install: `binwrap-install`
33250 error Exit status 1
33251 error Failed at the [email protected] install script.
33251 error This is probably not a problem with npm. There is likely additional logging output above.
33252 verbose exit [ 1, true ]
Following steps here: https://github.com/hasura/elm-graphql#running-the-app-yourself
Looking at steps wasn't clear how the first two steps related to the rest:
So I started with "Clone this repo:".
hasura/
and edit config.yaml
There is no hasura
top-level directory.
I modified the the endpoint in schema/config.yaml
instead
$ cat schema/config.yaml
endpoint: https://todo-mvc-elm-backend1.herokuapp.com
access_key: secret123
hasura migrate apply
fails:$ hasura migrate apply
FATA[0000] validating current directory failed: validate: cannot find [config.yaml, migrations] | search stopped at filesystem boundary
If I cd into schema
first the migration succeeds:
$ cd schema
[schema ruby-2.6.3 (master)]$ hasura migrate apply
INFO migrations applied
There is no graphql_url
in src/Main.elm
. It is located in src/GraphQLClient.elm
and already has the value: "https://todo-mvc-elm-backend1.herokuapp.com/v1alpha1/graphql"
The const
that needs to be updated in src/index.js
appears to be GRAPHQL_URI
not HASURA_GRAPHQL_URL
. GRAPHQL_URI
is already set to: 'todo-mvc-elm-backend1.herokuapp.com/v1alpha1/graphql'
The npm
commands to install dependencies and generate the Elm code with elm-graphql need to be run in the elm-app/
dir not in the root of the repository.
6 In order to generate the Elm code for the url in the generate-graph-types
script invocation in elm-app/package.json
also needs to be updated.
Original:
"generate-graph-types": "elm-graphql http://localhost:8080/v1alpha1/graphql --base Hasura --header 'x-hasura-admin-secret: secret123'"
Updated:
"generate-graph-types": "elm-graphql https://todo-mvc-elm-backend1.herokuapp.com/v1alpha1/graphql --base Hasura --header 'x-hasura-admin-secret: secret123'"
npm start
in directory elm-app/
succeeds but web app just displays: "Sign in" page. Registration does not work.The signup and login urls in src/Main.elm are referencing:
https://guarded-woodland-47581.herokuapp.com`. Changing these to: https://todo-mvc-elm-backend1.herokuapp.com
and attempting to register also fails.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.