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
+31-44Lines changed: 31 additions & 44 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,19 +44,22 @@ You can easily share your Playgrounds with others by clicking on the "Share" but
44
44
45
45
## Usage
46
46
47
-
[examples/latest.html](https://github.com/graphcool/graphql-playground/blob/master/packages/graphql-playground/examples/latest.html) contains a simple example on how to use the latest playground in your application.
47
+
### Properties
48
+
All interfaces, the React component `<Playground />` and all middlewares expose the same set of options:
48
49
49
-
You also can use the latest playground based on the npm package.
50
-
In order to do that, first you need to install `graphql-playground` via NPM. Then choose one of the following options to use the Playground in your own app/server.
51
-
52
-
```
53
-
yarn add graphql-playground
54
-
```
50
+
+`properties`
51
+
+`endpoint`[`string`] - the GraphQL endpoint url.
52
+
+`subscriptionEndpoint`[`string`] - the GraphQL subscriptions endpoint url.
53
+
+`setTitle`[`boolean`] - reflect the current endpoint in the page title
55
54
56
55
### As React Component
57
56
58
-
#### Usage
59
-
57
+
#### Install
58
+
```sh
59
+
yarn add graphql-playground
60
+
```
61
+
62
+
#### Use
60
63
GraphQL Playground provides a React component responsible for rendering the UI and Session management.
61
64
There are **3 dependencies** needed in order to run the `graphql-playground` React component.
62
65
1._Open Sans_ and _Source Code Pro_ fonts
@@ -65,12 +68,12 @@ There are **3 dependencies** needed in order to run the `graphql-playground` Rea
0 commit comments