Giter VIP home page Giter VIP logo

dgraph-js-http's People

Contributors

aelbannan avatar arjuninv avatar bucanero avatar danielmai avatar dependabot[bot] avatar gja avatar gpahal avatar janbehrens avatar joshua-goldstein avatar manishrjain avatar mbj36 avatar micheldiz avatar prashant-shahi avatar ryanfoxtyler avatar shivaji-dgraph avatar sleto-it avatar sydney-o9 avatar vardhanapoorv avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dgraph-js-http's Issues

Vue component

Similar to it would be fantastic to have a component that could run queries and mutations in the same fashion, but with a much cleaning code.

How hard would it be to wrap this "dgraph-js-http"?

Browser example : How to bundle the 'dgraph-js-http' lib in an HTML page

http1.zip

There is an example for Node.js on server side that is working well.
https://github.com/dgraph-io/dgraph-js-http/tree/master/examples/simple

Now when you want to test it on the browser side the require directive is not reconised by the JS on the browser side. " const dgraph = require("dgraph-js-http"); " gives an error.

I manage to use a "bundler " and got to the next series of problems ;)
Could you please provide with an example ?

This worked a little :
browserify index-promise.js > bundle.js

[Deps] Find new TS linter

Running npm install on current package gives unresolved peer dependency:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/tslint
npm ERR!   dev tslint@"^6.1.3" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer tslint@"^5.1.0" from [email protected]
npm ERR! node_modules/tslint-microsoft-contrib
npm ERR!   dev tslint-microsoft-contrib@"^6.2.0" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: [email protected]
npm ERR! node_modules/tslint
npm ERR!   peer tslint@"^5.1.0" from [email protected]
npm ERR!   node_modules/tslint-microsoft-contrib
npm ERR!     dev tslint-microsoft-contrib@"^6.2.0" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

Hence why we currently require npm install --legacy-peer-deps. This is because https://github.com/microsoft/tslint-microsoft-contrib is out of date and no longer maintained. We should switch to a more modern linter. Perhaps https://github.com/typescript-eslint/typescript-eslint.

ERR_NO_CLIENTS with a DgraphClientStub provided

I'm trying to use the module in an Electron application but I get the ERR_NO_CLIENTS: Error: No clients provided in DgraphClient constructor error. The DgraphClientStub however is provided and alpha / zero are both running and reachable through ratel.

const dgraph = require('dgraph-js-http')

const dgraphClientStub = new dgraph.DgraphClientStub()
const dgraphClient = new dgraph.DgraphClient(dgraphClientStub)

console.log(dgraph, dgraphClient, dgraphClientStub)

I've tried with the latest version "dgraph-js-http": "20.3.0"

screenshot-20200427114604907598485

and branch v1.1.0-rc2 "dgraph-js-http": "file:/./build-steps/dgraph-js-http-1.1.0-rc2".

screenshot-20200427190011298738225

dgraph-ratel

From Installed Binary

dgraph-ratel -version

Ratel Version:

localhost:8000
errot:We seem to have difficulties loading latest client. Try using the pac

Problems using dgraph-js-http and dgraph-js with VUE

When importing dgraph-js or dgraph-js-http into VUE JS, I get errors.

Environment:

  • npm 6.3.0
  • vue-cli 3.0.0-rc.11

To replicate do the following:

vue create dgraph_project

  • select manually (babel, router, vuex)
    -- the other choices are not that relevant.

cd dgraph_project
yarn add dgraph-js-http grpc dgraph-js

Add the following to the src/main.js file

import dgraph from 'dgraph-js'

yarn serve

Goto http://localhost:8080/ and check the console log in the browser.

Errors

For dgraph-js

TypeError: process.version is undefined

For dgraph-js-http

[Vue warn]: Error in render: "TypeError: dgraph_js_http__WEBPACK_IMPORTED_MODULE_0___default.a is undefined"
When I try to invoke the library by running the simple example.

I suspect that the use webpack 4 might be the reason for this problem.
However, I would appreciate if the dgraph-js library could work "out of the box" with vue-cli v3 and webpack 4.

Sorry for the trouble.

Remove LinRead from code.

As LinRead ins't been used by Dgraph anymore and is causing issues with CORS. Need to be cleanup.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.