Skip to content

Commit

Permalink
Merge branch 'master' of github.com:HriBB/apollo-upload-network-inter…
Browse files Browse the repository at this point in the history
…face
  • Loading branch information
HriBB committed Feb 6, 2017
2 parents 1cd6598 + 14942b4 commit 1750506
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 41 deletions.
42 changes: 5 additions & 37 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,39 +1,7 @@
lib

# Logs
logs
node_modules
*.log
npm-debug.log*

# Runtime data
pids
*.pid
*.seed

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
.DS_Store
lib
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules
jspm_packages

# Optional npm cache directory
.npm

# Optional REPL history
.node_repl_history
.idea
npm-debug.log
7 changes: 7 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.DS_Store
*.log
src
test
examples
coverage
node_modules
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# apollo-upload-network-interface
UploadNetworkInterface for Apollo GraphQL Client

UploadNetworkInterface for Apollo GraphQL Client. Adds support for `multipart/form-data` requests.

Used together with [graphql-server-express-upload](https://github.com/HriBB/graphql-server-express-upload) and [graphql-server-koa-upload](https://github.com/HriBB/graphql-server-koa-upload) (coming soon).

_Any help is appreciated!_

## Usage

Expand All @@ -8,14 +13,15 @@ import ApolloClient from 'apollo-client'
import createNetworkInterface from 'apollo-upload-network-interface'
const networkInterface = createNetworkInterface({
uri: config.graphql.url,
uri: '/graphql',
})
export default new ApolloClient({
const client = new ApolloClient({
networkInterface
})
```

## TODO

- [ ] Add some tests
- [ ] Add tests
- [ ] Convert to typescript
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
"semantic-release": "semantic-release pre && npm publish && semantic-release post",
"test": "mocha ./test/setup.js"
},
"files": [
"lib"
],
"repository": {
"type": "git",
"url": "https://github.com/HriBB/apollo-upload-network-interface.git"
Expand Down

0 comments on commit 1750506

Please sign in to comment.