Skip to content

Commit 392932f

Browse files
committed
Updating test suite to cover all the new graphql features and adding in some extra testing of the older rest features in case we still need them
Added some changes to the graphql base query to include generation of filter and sort params. Updated the filter factory to support the rest mode (prepended $ sign) and the graphql mode.
1 parent ddb1dfa commit 392932f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

app/services/cms/resource.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,11 @@ def self.clear_cache(key = nil)
126126
when "rest"
127127
Providers::Strapi::Client.new
128128
when "graphql"
129-
Providers::Strapi::GraphqlClient.new
129+
if Rails.env.test?
130+
Providers::Strapi::GraphqlClient.new(schema_path: StrapiStubs::GRAPH_SCHEMA)
131+
else
132+
Providers::Strapi::GraphqlClient.new
133+
end
130134
else
131135
Providers::Strapi::Client.new
132136
end

0 commit comments

Comments
 (0)