graphql-preview 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/graphql-preview/mask.rb +1 -0
- data/lib/graphql-preview/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ec6b0021eb3956036b54ed95ffe944074f414859
|
4
|
+
data.tar.gz: 5872d56d125c988408966791bc6bbc081ca1e4e1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8684b3af37dfd4768ea539098e2c0f93358d8eeca6e99ee16bf3eb65e78b0d26fbb0ea73e6b16f13005663cf1209780de239cc7bddb602330431feb64b93c460
|
7
|
+
data.tar.gz: c3533ca6da4d4b23c77606ac3eea092a695f3721b7d8f25d4d85a771c395f3a269af501e46f83303e3335e51a17aac8d94f8f41496e0a0d4c63df9a229882498
|
data/lib/graphql-preview/mask.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
module GraphQLPreview
|
2
2
|
class Mask
|
3
3
|
def self.call(member, context)
|
4
|
+
return false unless member.respond_to?(:metadata)
|
4
5
|
return false unless member.metadata.key?(:preview_toggled_by)
|
5
6
|
unless context.key?(:schema_previews)
|
6
7
|
raise ArgumentError, "You are using the `GraphQLPreview::Mask`, but key `:schema_previews` was not provided to the `context`"
|