Skip to content

Commit 69a02c4

Browse files
committed
Correct type
1 parent b49e5ed commit 69a02c4

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

Rakefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ task :generate_sample do
4747

4848
options = {}
4949
options[:delete_output] = true
50-
options[:base_url] = '/graphql-docs'
50+
options[:base_url] = ENV.fetch('GQL_DOCS_BASE_URL', '')
5151
options[:filename] = File.join(File.dirname(__FILE__), 'test', 'graphql-docs', 'fixtures', 'gh-schema.graphql')
5252

5353
GraphQLDocs.build(options)
@@ -67,6 +67,7 @@ end
6767

6868
desc 'Generate and publish docs to gh-pages'
6969
task :publish do
70+
ENV['GQL_DOCS_BASE_URL'] = '/graphql-docs'
7071
Rake::Task[:generate_sample].invoke('https://www.gjtorikian.com/graphql-docs')
7172
Dir.mktmpdir do |tmp|
7273
system "mv output/* #{tmp}"

lib/graphql-docs/parser.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,8 @@ def generate_type(type)
216216

217217
{
218218
name: name,
219-
path: path + '/' + slugify(name),
220-
info: type.to_s
219+
path: "#{path}/#{slugify(name)}",
220+
info: type.graphql_definition
221221
}
222222
end
223223

0 commit comments

Comments
 (0)