Skip to content

Commit 7465fba

Browse files
committed
Set graphiql subscriptions endpoint
1 parent 46dcf6d commit 7465fba

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

examples/server/main.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ func main() {
6363

6464
var mutationType = graphql.NewObject(
6565
graphql.ObjectConfig{
66-
Name: "SomeMutation",
66+
Name: "Mutation",
6767
Fields: graphql.Fields{
6868
"updateDocument": &graphql.Field{
6969
Type: documentType,
@@ -158,9 +158,11 @@ func main() {
158158
})
159159

160160
graphqlHandler := handler.New(&handler.Config{
161-
Schema: &schema,
162-
Pretty: true,
163-
GraphiQL: true,
161+
Schema: &schema,
162+
Pretty: true,
163+
GraphiQL: true,
164+
EndpointURL: "http://localhost:8085",
165+
SubscriptionsEndpoint: "ws://localhost:8085/subscriptions",
164166
})
165167

166168
http.Handle("/", graphqlHandler)

0 commit comments

Comments
 (0)