Skip to content
This repository was archived by the owner on Sep 24, 2019. It is now read-only.

Commit 27075ca

Browse files
committed
GraphiQL settings
1 parent a96a47a commit 27075ca

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

config/initializers/graphiql.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
require "base64"
22

3+
GraphiQL::Rails.config.initial_query = "query { allFilms { edges { node { title } } } }"
4+
35
GraphiQL::Rails.config.headers['Authorization'] = -> (context) do
46
credentials = Base64.strict_encode64("#{context.params['username']}:#{context.params['password']}")
57
"basic #{credentials}"
68
end
9+
10+
GraphiQL::Rails.config.query_params = true

0 commit comments

Comments
 (0)