Skip to content

Commit 42ba90b

Browse files
authored
Merge pull request #1 from smooth-code/various-fixes
Various fixes
2 parents c16be66 + 3be52a6 commit 42ba90b

File tree

4 files changed

+13
-15
lines changed

4 files changed

+13
-15
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ const props = mocker.mockFragments(ArticleCard.fragments, {
265265

266266
## API
267267

268-
### `fraql\`\``
268+
### `fraql` / `gql`
269269

270270
The default export of `fraql` is a drop-in replacement for `graphql-tag` that automatically converts fragments into inline fragments.
271271

package.json

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@
5252
"eslint-config-airbnb-base": "^12.1.0",
5353
"eslint-config-prettier": "^2.9.0",
5454
"eslint-plugin-import": "^2.11.0",
55+
"graphql": "^0.13.2",
56+
"graphql-tag": "^2.9.2",
57+
"graphql-tools": "^3.0.2",
5558
"jest": "^22.4.3",
5659
"prettier": "^1.12.1",
5760
"rollup": "^0.58.2",
@@ -65,11 +68,6 @@
6568
"rollup-plugin-visualizer": "^0.6.0",
6669
"standard-version": "^4.3.0"
6770
},
68-
"dependencies": {
69-
"graphql": "^0.13.2",
70-
"graphql-tag": "^2.9.2",
71-
"graphql-tools": "^3.0.2"
72-
},
7371
"bundlesize": [
7472
{
7573
"path": "./dist/fraql.min.js",

rollup.config.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import json from 'rollup-plugin-json'
77
import uglify from 'rollup-plugin-uglify'
88
import visualizer from 'rollup-plugin-visualizer'
99
import sourceMaps from 'rollup-plugin-sourcemaps'
10-
import pkg from './package.json'
1110

1211
const commonPlugins = [
1312
json(),
@@ -17,19 +16,19 @@ const commonPlugins = [
1716
commonjs({ ignoreGlobal: true }),
1817
]
1918

20-
const configBase = {
21-
input: 'src/index.js',
22-
external: ['graphql/language'].concat(Object.keys(pkg.dependencies)),
23-
plugins: commonPlugins,
24-
}
25-
2619
const globals = {
2720
'graphql-tag': 'gql',
2821
graphql: 'graphql',
2922
'graphql-tools': 'graphqlTools',
3023
'graphql/language': 'graphqlLanguage',
3124
}
3225

26+
const configBase = {
27+
input: 'src/index.js',
28+
external: Object.keys(globals),
29+
plugins: commonPlugins,
30+
}
31+
3332
const umdConfig = Object.assign({}, configBase, {
3433
output: {
3534
file: 'dist/fraql.js',

src/mock.test.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
import { GraphQLSchema } from 'graphql'
22
import { makeExecutableSchema } from 'graphql-tools'
33
import * as introspectionResult from './__fixtures__/schema.json'
4-
import gql, {
4+
import gql from './'
5+
import {
56
Mocker,
67
createMockerFromIntrospection,
78
createMockerFromSchema,
89
generateSchemaFromIntrospectionResult,
9-
} from './'
10+
} from './mock'
1011

1112
describe('mock', () => {
1213
let mocker

0 commit comments

Comments
 (0)