graphql_devise 0.8.0 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/app/graphql/graphql_devise/resolvers/dummy.rb +12 -0
- data/app/graphql/graphql_devise/schema.rb +0 -1
- data/lib/graphql_devise/rails/routes.rb +7 -1
- data/lib/graphql_devise/version.rb +1 -1
- data/spec/dummy/log/test.log +2645 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c2c83dfb6c9f669c409b21975688d9456715a599ca6239426dd1441cda422939
|
4
|
+
data.tar.gz: c9a1d90df7f63225678045d451b64982e1de08c474a6b2bbf2422bb0b5438c97
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 65a4f0fe8950268893883195e2ac1c191080f1ff34e4f88dc2b856e3a69303f3b4218504540b7436e8803884ec69bf38a1e17b9ce6bcc18447232637ccf9e034
|
7
|
+
data.tar.gz: 97f3ede65094c97442b6cae271fe9b9b7800d1787095034e5296732b18ac4e771a3d62249668b5f21872897351cc0f2c8b5d18e3fdb604ff3832e60ef47a2bfa
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [v0.8.1](https://github.com/graphql-devise/graphql_devise/tree/v0.8.1) (2019-11-27)
|
4
|
+
|
5
|
+
[Full Changelog](https://github.com/graphql-devise/graphql_devise/compare/v0.8.0...v0.8.1)
|
6
|
+
|
7
|
+
**Fixed bugs:**
|
8
|
+
|
9
|
+
- Add dummy query field if none is provided. Works when devise\_invitable is loaded [\#48](https://github.com/graphql-devise/graphql_devise/pull/48) ([mcelicalderon](https://github.com/mcelicalderon))
|
10
|
+
|
3
11
|
## [v0.8.0](https://github.com/graphql-devise/graphql_devise/tree/v0.8.0) (2019-11-26)
|
4
12
|
|
5
13
|
[Full Changelog](https://github.com/graphql-devise/graphql_devise/compare/v0.7.0...v0.8.0)
|
@@ -0,0 +1,12 @@
|
|
1
|
+
module GraphqlDevise
|
2
|
+
module Resolvers
|
3
|
+
class Dummy < Base
|
4
|
+
type String, null: false
|
5
|
+
description 'Field necessary as at least one query must be present in the schema'
|
6
|
+
|
7
|
+
def resolve
|
8
|
+
'Dummy field necessary as graphql-ruby gem requires at least one query to be present in the schema.'
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
@@ -36,7 +36,7 @@ module ActionDispatch::Routing
|
|
36
36
|
devise_for(
|
37
37
|
resource.pluralize.underscore.tr('/', '_').to_sym,
|
38
38
|
module: :devise,
|
39
|
-
skip: [:sessions, :registrations, :passwords, :confirmations, :omniauth_callbacks, :unlocks]
|
39
|
+
skip: [:sessions, :registrations, :passwords, :confirmations, :omniauth_callbacks, :unlocks, :invitations]
|
40
40
|
)
|
41
41
|
|
42
42
|
authenticatable_type = opts[:authenticatable_type] ||
|
@@ -63,6 +63,8 @@ module ActionDispatch::Routing
|
|
63
63
|
GraphqlDevise::Types::MutationType.field("#{mapping_name}_#{action}", mutation: used_mutation)
|
64
64
|
end
|
65
65
|
|
66
|
+
GraphqlDevise::Schema.mutation(GraphqlDevise::Types::MutationType) if used_mutations.present?
|
67
|
+
|
66
68
|
used_queries = if only_operations.present?
|
67
69
|
default_queries.slice(*only_operations)
|
68
70
|
else
|
@@ -83,6 +85,10 @@ module ActionDispatch::Routing
|
|
83
85
|
GraphqlDevise::Types::QueryType.field("#{mapping_name}_#{action}", resolver: used_query)
|
84
86
|
end
|
85
87
|
|
88
|
+
if used_queries.blank? && GraphqlDevise::Types::QueryType.fields.blank?
|
89
|
+
GraphqlDevise::Types::QueryType.field(:dummy, resolver: GraphqlDevise::Resolvers::Dummy)
|
90
|
+
end
|
91
|
+
|
86
92
|
Devise.mailer.helper(GraphqlDevise::MailerHelper)
|
87
93
|
|
88
94
|
devise_scope mapping_name do
|