/gqlx-apollo-express-server-2-example

A working example of gqlx-apollo-express-server which uses apollo-server@2.x

Primary LanguageJavaScript

How to run a project?

  1. Clone the fork git clone git@github.com:dimabory/gqlx-apollo-express-server.git
  2. Create the link cd gqlx-apollo-express-server && npm build && npm link
  3. Go to the project and link it cd gqlx-apollo-express-server-2-example && npm link gqlx-apollo-express-server
  4. Run it npm start or npm run dev (hot-reload)

Running a project register an initial service and graphql schema. Open playground http://localhost:3000/graphql in order to test it.

curl --location --request POST 'http://localhost:3000/graphql' \
--header 'Content-Type: application/json' \
--form 'operations={"query": "mutation fileUpload($file: Upload) { uploadFile(file: $file) }"}' \
--form 'map={"0": ["variables.file"]}
' \
--form '0=@<absolute_path_to_the_file>'