Skip to content

Commit

Permalink
Merge pull request #2 from grvty-labs/master
Browse files Browse the repository at this point in the history
Import fixes for rxjs
  • Loading branch information
ihorkatkov authored Feb 9, 2018
2 parents d717647 + 19f516b commit bb181ae
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "apollo-absinthe-upload-link",
"version": "1.0.2",
"version": "1.0.3",
"description": "A network interface for Apollo that enables file-uploading to Absinthe back ends.",
"main": "src/index.js",
"repository": "https://github.com/bytewitchcraft/apollo-absinthe-upload-link",
Expand Down
6 changes: 4 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import { HttpLink } from 'apollo-link-http'
import { ApolloLink, concat } from 'apollo-link'
import { printAST } from 'apollo-client'
import { ajax } from 'rxjs/observable/dom/ajax'
import { Observable } from 'rxjs/Observable';
import 'rxjs/add/observable/dom/ajax';
import 'rxjs/add/operator/map';
import { pipe, append, join } from 'ramda'

const isObject = value => value !== null && typeof value === 'object'
Expand Down Expand Up @@ -52,7 +54,7 @@ const createUploadMiddleware = ({ uri }) =>
formData.append('variables', JSON.stringify(variables))
files.forEach(({ name, file }) => formData.append(name, file))

return ajax({
return Observable.ajax({
url: uri,
body: formData,
method: 'POST',
Expand Down

0 comments on commit bb181ae

Please sign in to comment.