examples/github-graphql-example.rb in okay-6.0.0 vs examples/github-graphql-example.rb in okay-7.0.0
- old
+ new
@@ -3,8 +3,9 @@
query = Okay::GraphQL.query {
viewer {
login
}
}
-
-results = query.submit!(:github, {bearer_token: ENV['DEMO_GITHUB_TOKEN']}).or_raise!
+
+headers = { bearer_token: ENV['DEMO_GITHUB_TOKEN'] }
+results = query.submit!(:github, headers).or_raise!
puts results.from_json