Skip to content

Commit

Permalink
fix: apollo-client no longer exports printAST (#21)
Browse files Browse the repository at this point in the history
* fix: apollo-client no longer exports printAST

* fix: formatting issues, obey to prettier.js format
  • Loading branch information
ckruse authored and ihorkatkov committed Jan 28, 2019
1 parent c8a2dc0 commit 75def44
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { HttpLink } from 'apollo-link-http'
import { ApolloLink, concat } from 'apollo-link'
import { printAST } from 'apollo-client'
import { print } from 'graphql/language/printer'
import request from './request'
import extractFiles from './extractFiles'
import { isObject } from './validators'
Expand All @@ -17,7 +17,7 @@ export const createUploadMiddleware = ({ uri, headers, fetch }) =>
const { headers: contextHeaders } = context
const formData = new FormData()

formData.append('query', printAST(operation.query))
formData.append('query', print(operation.query))
formData.append('variables', JSON.stringify(variables))
files.forEach(({ name, file }) => formData.append(name, file))

Expand Down

0 comments on commit 75def44

Please sign in to comment.