You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+14-17Lines changed: 14 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -79,21 +79,6 @@ GraphQL.js is **isomorphic**. You can use it in both **browser and Node.js**.
79
79
var graphql =require('graphql.js')
80
80
```
81
81
82
-
##### Using with `graphql-tag`
83
-
84
-
`[graphql-tag](https://github.com/apollographql/graphql-tag)` converts GraphQL query strings to AST. You can use `graphql-tag` with GraphQL.js
85
-
86
-
```js
87
-
var gql =require('graphql-tag')
88
-
var graphql =require('graphql.js')
89
-
90
-
// setup...
91
-
92
-
graph.query(gql`query { name }`)
93
-
```
94
-
95
-
> Using `graphql-tag` will not allow you to use _auto declaration_ and _nested fragments_ syntaxes since these are not valid query syntax for GraphQL but only for this library.
96
-
97
82
## Connection
98
83
99
84
Create a simple connection to your GraphQL endpoint.
@@ -469,7 +454,8 @@ fragment username_admin on AdminUser {
469
454
}
470
455
```
471
456
472
-
## Using with Vue.js
457
+
## Advanced
458
+
### Using with Vue.js
473
459
474
460
Create a `GraphQLProvider.js`.
475
461
@@ -520,7 +506,7 @@ methods: {
520
506
}
521
507
```
522
508
523
-
## Change POST Method
509
+
###Change POST Method
524
510
525
511
As default, GraphQL.js makes a POST request. But you can change the behavior by setting `asJSON`.
526
512
@@ -529,6 +515,17 @@ var graph = graphql("http://localhost:3000/graphql", {
529
515
asJSON:true
530
516
});
531
517
```
518
+
### Using with `graphql-tag`
519
+
520
+
[`graphql-tag`](https://github.com/apollographql/graphql-tag) converts GraphQL query strings to AST. You can use `graphql-tag` with GraphQL.js
521
+
522
+
```js
523
+
graph.query(gql`query { name }`)
524
+
```
525
+
526
+
> Using `graphql-tag` will not allow you to use _auto declaration_ and _nested fragments_ syntaxes since these are not valid query syntax for GraphQL but only for this library.
0 commit comments