All Files
(
- 96.0%
+ 96.15%
covered at
- 1.73
+ 1.7
hits/line
)
@@ -39,15 +39,15 @@
- 55 files in total.
+ 56 files in total.
- 750 relevant lines,
- 720 lines covered and
+ 779 relevant lines,
+ 749 lines covered and
30 lines missed.
(
- 96.0%
+ 96.15%
)
@@ -71,7 +71,7 @@
- app/controllers/application_controller.rb
+ app/controllers/application_controller.rb
100.00 %
2
1
@@ -82,7 +82,7 @@
- app/controllers/graphql_controller.rb
+ app/controllers/graphql_controller.rb
56.00 %
54
25
@@ -93,7 +93,7 @@
- app/graphql/gear_up_be_schema.rb
+ app/graphql/gear_up_be_schema.rb
69.23 %
42
13
@@ -104,7 +104,7 @@
- app/graphql/mutations/base_mutation.rb
+ app/graphql/mutations/base_mutation.rb
100.00 %
10
6
@@ -115,7 +115,7 @@
- app/graphql/mutations/create_donation.rb
+ app/graphql/mutations/create_donation.rb
93.75 %
33
16
@@ -126,7 +126,7 @@
- app/graphql/mutations/create_post.rb
+ app/graphql/mutations/create_post.rb
93.75 %
43
16
@@ -137,7 +137,7 @@
- app/graphql/mutations/update_donation.rb
+ app/graphql/mutations/update_donation.rb
92.86 %
33
14
@@ -148,7 +148,7 @@
- app/graphql/mutations/update_post.rb
+ app/graphql/mutations/update_post.rb
93.75 %
37
16
@@ -159,7 +159,7 @@
- app/graphql/types/artist_type.rb
+ app/graphql/types/artist_type.rb
95.45 %
33
22
@@ -170,7 +170,7 @@
- app/graphql/types/base_argument.rb
+ app/graphql/types/base_argument.rb
100.00 %
6
2
@@ -181,7 +181,7 @@
- app/graphql/types/base_connection.rb
+ app/graphql/types/base_connection.rb
100.00 %
8
3
@@ -192,7 +192,7 @@
- app/graphql/types/base_edge.rb
+ app/graphql/types/base_edge.rb
100.00 %
8
3
@@ -203,7 +203,7 @@
- app/graphql/types/base_field.rb
+ app/graphql/types/base_field.rb
100.00 %
7
3
@@ -214,7 +214,7 @@
- app/graphql/types/base_input_object.rb
+ app/graphql/types/base_input_object.rb
100.00 %
7
3
@@ -225,7 +225,7 @@
- app/graphql/types/base_interface.rb
+ app/graphql/types/base_interface.rb
100.00 %
11
6
@@ -236,7 +236,7 @@
- app/graphql/types/base_object.rb
+ app/graphql/types/base_object.rb
100.00 %
9
5
@@ -247,7 +247,7 @@
- app/graphql/types/donation_type.rb
+ app/graphql/types/donation_type.rb
100.00 %
13
9
@@ -258,7 +258,7 @@
- app/graphql/types/mutation_type.rb
+ app/graphql/types/mutation_type.rb
100.00 %
10
6
@@ -269,7 +269,7 @@
- app/graphql/types/node_type.rb
+ app/graphql/types/node_type.rb
100.00 %
9
4
@@ -280,7 +280,7 @@
- app/graphql/types/post_order_enum.rb
+ app/graphql/types/post_order_enum.rb
100.00 %
6
4
@@ -291,7 +291,7 @@
- app/graphql/types/post_type.rb
+ app/graphql/types/post_type.rb
100.00 %
26
17
@@ -302,7 +302,7 @@
- app/graphql/types/query_type.rb
+ app/graphql/types/query_type.rb
70.37 %
52
27
@@ -313,7 +313,7 @@
- app/helpers/application_helper.rb
+ app/helpers/application_helper.rb
100.00 %
2
1
@@ -324,7 +324,7 @@
- app/mailers/application_mailer.rb
+ app/mailers/application_mailer.rb
100.00 %
4
3
@@ -335,7 +335,7 @@
- app/mailers/welcome_mailer.rb
+ app/mailers/welcome_mailer.rb
100.00 %
9
5
@@ -346,7 +346,7 @@
- app/models/application_record.rb
+ app/models/application_record.rb
100.00 %
3
2
@@ -357,7 +357,7 @@
- app/models/artist.rb
+ app/models/artist.rb
100.00 %
7
4
@@ -368,7 +368,7 @@
- app/models/donation.rb
+ app/models/donation.rb
100.00 %
4
3
@@ -379,7 +379,7 @@
- app/models/post.rb
+ app/models/post.rb
100.00 %
21
9
@@ -390,7 +390,7 @@
- app/workers/welcome_email_worker.rb
+ app/workers/welcome_email_worker.rb
100.00 %
9
6
@@ -401,7 +401,7 @@
- config/application.rb
+ config/application.rb
100.00 %
37
15
@@ -412,7 +412,7 @@
- config/boot.rb
+ config/boot.rb
100.00 %
4
3
@@ -423,7 +423,7 @@
- config/environment.rb
+ config/environment.rb
100.00 %
5
2
@@ -434,7 +434,7 @@
- config/environments/test.rb
+ config/environments/test.rb
100.00 %
60
17
@@ -445,7 +445,7 @@
- config/initializers/assets.rb
+ config/initializers/assets.rb
100.00 %
12
1
@@ -456,7 +456,7 @@
- config/initializers/content_security_policy.rb
+ config/initializers/content_security_policy.rb
100.00 %
25
0
@@ -467,7 +467,7 @@
- config/initializers/cors.rb
+ config/initializers/cors.rb
100.00 %
9
4
@@ -478,7 +478,7 @@
- config/initializers/filter_parameter_logging.rb
+ config/initializers/filter_parameter_logging.rb
100.00 %
8
1
@@ -489,7 +489,7 @@
- config/initializers/inflections.rb
+ config/initializers/inflections.rb
100.00 %
16
0
@@ -500,7 +500,7 @@
- config/initializers/permissions_policy.rb
+ config/initializers/permissions_policy.rb
100.00 %
11
0
@@ -511,7 +511,7 @@
- config/initializers/sidekiq.rb
+ config/initializers/sidekiq.rb
75.00 %
7
4
@@ -522,7 +522,7 @@
- config/routes.rb
+ config/routes.rb
83.33 %
11
6
@@ -533,7 +533,18 @@
- spec/models/artist_spec.rb
+ spec/mailers/welcome_mailer_spec.rb
+ 100.00 %
+ 128
+ 29
+ 29
+ 0
+ 1.00
+
+
+
+
+ spec/models/artist_spec.rb
100.00 %
16
11
@@ -544,7 +555,7 @@
- spec/models/donation_spec.rb
+ spec/models/donation_spec.rb
100.00 %
13
8
@@ -555,7 +566,7 @@
- spec/models/post_spec.rb
+ spec/models/post_spec.rb
100.00 %
70
27
@@ -566,7 +577,7 @@
- spec/requests/artists/all_artists_spec.rb
+ spec/requests/artists/all_artists_spec.rb
100.00 %
139
61
@@ -577,7 +588,7 @@
- spec/requests/artists/one_artist_spec.rb
+ spec/requests/artists/one_artist_spec.rb
100.00 %
95
43
@@ -588,7 +599,7 @@
- spec/requests/artists_posts/all_artists_with_posts_spec.rb
+ spec/requests/artists_posts/all_artists_with_posts_spec.rb
100.00 %
175
81
@@ -599,7 +610,7 @@
- spec/requests/artists_posts/mutation_create_posts_spec.rb
+ spec/requests/artists_posts/mutation_create_posts_spec.rb
100.00 %
68
22
@@ -610,7 +621,7 @@
- spec/requests/artists_posts/one_artist_with_posts_spec.rb
+ spec/requests/artists_posts/one_artist_with_posts_spec.rb
100.00 %
154
65
@@ -621,7 +632,7 @@
- spec/requests/artists_posts/update_post_spec.rb
+ spec/requests/artists_posts/update_post_spec.rb
100.00 %
121
42
@@ -632,7 +643,7 @@
- spec/requests/donations/create_donation_spec.rb
+ spec/requests/donations/create_donation_spec.rb
100.00 %
0
0
@@ -643,7 +654,7 @@
- spec/requests/donations/mutation_create_donation_spec.rb
+ spec/requests/donations/mutation_create_donation_spec.rb
100.00 %
95
31
@@ -654,7 +665,7 @@
- spec/requests/donations/update_donation_spec.rb
+ spec/requests/donations/update_donation_spec.rb
100.00 %
114
36
@@ -665,7 +676,7 @@
- spec/workers/welcome_email_worker_spec.rb
+ spec/workers/welcome_email_worker_spec.rb
100.00 %
49
16
@@ -692,7 +703,7 @@
-
+
app/controllers/application_controller.rb
@@ -745,7 +756,7 @@
-
+
app/controllers/graphql_controller.rb
@@ -1370,7 +1381,7 @@
-
+
app/graphql/gear_up_be_schema.rb
@@ -1863,7 +1874,7 @@
-
+
app/graphql/mutations/base_mutation.rb
@@ -2004,7 +2015,7 @@
-
+
app/graphql/mutations/create_donation.rb
@@ -2398,7 +2409,7 @@
-
+
app/graphql/mutations/create_post.rb
@@ -2902,7 +2913,7 @@
-
+
app/graphql/mutations/update_donation.rb
@@ -3296,7 +3307,7 @@
-
+
app/graphql/mutations/update_post.rb
@@ -3734,7 +3745,7 @@
-
+
app/graphql/types/artist_type.rb
@@ -4128,7 +4139,7 @@
-
+
app/graphql/types/base_argument.rb
@@ -4225,7 +4236,7 @@
-
+
app/graphql/types/base_connection.rb
@@ -4344,7 +4355,7 @@
-
+
app/graphql/types/base_edge.rb
@@ -4463,7 +4474,7 @@
-
+
app/graphql/types/base_field.rb
@@ -4571,7 +4582,7 @@
-
+
app/graphql/types/base_input_object.rb
@@ -4679,7 +4690,7 @@
-
+
app/graphql/types/base_interface.rb
@@ -4831,7 +4842,7 @@
-
+
app/graphql/types/base_object.rb
@@ -4961,7 +4972,7 @@
-
+
app/graphql/types/donation_type.rb
@@ -5135,7 +5146,7 @@
-
+
app/graphql/types/mutation_type.rb
@@ -5276,7 +5287,7 @@
-
+
app/graphql/types/node_type.rb
@@ -5406,7 +5417,7 @@
-
+
app/graphql/types/post_order_enum.rb
@@ -5503,7 +5514,7 @@
-
+
app/graphql/types/post_type.rb
@@ -5820,7 +5831,7 @@
-
+
app/graphql/types/query_type.rb
@@ -6423,7 +6434,7 @@
-
+
app/helpers/application_helper.rb
@@ -6476,7 +6487,7 @@
-
+
app/mailers/application_mailer.rb
@@ -6551,7 +6562,7 @@
-
+
app/mailers/welcome_mailer.rb
@@ -6681,7 +6692,7 @@
-
+
app/models/application_record.rb
@@ -6745,7 +6756,7 @@
-
+
app/models/artist.rb
@@ -6853,7 +6864,7 @@
-
+
app/models/donation.rb
@@ -6928,7 +6939,7 @@
-
+
app/models/post.rb
@@ -7190,7 +7201,7 @@
-
+
app/workers/welcome_email_worker.rb
@@ -7320,7 +7331,7 @@
-
+
config/application.rb
@@ -7758,7 +7769,7 @@
-
+
config/boot.rb
@@ -7833,7 +7844,7 @@
-
+
config/environment.rb
@@ -7919,7 +7930,7 @@
-
+
config/environments/test.rb
@@ -8610,7 +8621,7 @@
-
+
config/initializers/assets.rb
@@ -8773,7 +8784,7 @@
-
+
config/initializers/content_security_policy.rb
@@ -9079,7 +9090,7 @@
-
+
config/initializers/cors.rb
@@ -9209,7 +9220,7 @@
-
+
config/initializers/filter_parameter_logging.rb
@@ -9328,7 +9339,7 @@
-
+
config/initializers/inflections.rb
@@ -9535,7 +9546,7 @@
-
+
config/initializers/permissions_policy.rb
@@ -9687,7 +9698,7 @@
-
+
config/initializers/sidekiq.rb
@@ -9795,7 +9806,7 @@
-
+
config/routes.rb
@@ -9947,7 +9958,1446 @@
-
+
+
+ spec/mailers/welcome_mailer_spec.rb
+
+
+ 100.0%
+
+
+ lines covered
+
+
+
+
+
+ 29 relevant lines.
+ 29 lines covered and
+ 0 lines missed.
+
+
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
# spec/mailers/welcome_mailer_spec.rb
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+ -
+ 1
+
+
+
+
+
require 'rails_helper'
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+ -
+ 1
+
+
+
+
+
RSpec.describe WelcomeMailer, type: :mailer do
+
+
+
+
+ -
+ 1
+
+
+
+
+
describe 'donation_confirmation_email' do
+
+
+
+
+ -
+ 1
+
+
+
+
+
it 'renders the subject' do
+
+
+
+
+ -
+ 1
+
+
+
+
+
artist = Artist.create(
+
+
+
+
+ -
+
+
+
+
+
+
name: 'John Doe',
+
+
+
+
+ -
+
+
+
+
+
+
email: 'john@example.com',
+
+
+
+
+ -
+
+
+
+
+
+
city: 'Sample City',
+
+
+
+
+ -
+
+
+
+
+
+
state: 'Sample State',
+
+
+
+
+ -
+
+
+
+
+
+
zipcode: '12345',
+
+
+
+
+ -
+
+
+
+
+
+
password_digest: 'sample_password_digest',
+
+
+
+
+ -
+
+
+
+
+
+
medium: 'Sample Medium',
+
+
+
+
+ -
+
+
+
+
+
+
profile_image: 'sample_profile_image.jpg'
+
+
+
+
+ -
+
+
+
+
+
+
)
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+ -
+ 1
+
+
+
+
+
donation = Donation.create(
+
+
+
+
+ -
+
+
+
+
+
+
name: 'Sample Name',
+
+
+
+
+ -
+
+
+
+
+
+
email: 'donor@example.com',
+
+
+
+
+ -
+
+
+
+
+
+
amount: 100.0,
+
+
+
+
+ -
+
+
+
+
+
+
post_id: 1
+
+
+
+
+ -
+
+
+
+
+
+
)
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+ -
+ 1
+
+
+
+
+
mail = WelcomeMailer.donation_confirmation_email(artist, donation)
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+ -
+ 1
+
+
+
+
+
expect(mail.subject).to eq('Donation Confirmation')
+
+
+
+
+ -
+
+
+
+
+
+
end
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+ -
+ 1
+
+
+
+
+
it 'renders the receiver email' do
+
+
+
+
+ -
+ 1
+
+
+
+
+
artist = Artist.create(
+
+
+
+
+ -
+
+
+
+
+
+
name: 'Jane Smith',
+
+
+
+
+ -
+
+
+
+
+
+
email: 'jane@example.com',
+
+
+
+
+ -
+
+
+
+
+
+
city: 'Sample City',
+
+
+
+
+ -
+
+
+
+
+
+
state: 'Sample State',
+
+
+
+
+ -
+
+
+
+
+
+
zipcode: '12345',
+
+
+
+
+ -
+
+
+
+
+
+
password_digest: 'sample_password_digest',
+
+
+
+
+ -
+
+
+
+
+
+
medium: 'Sample Medium',
+
+
+
+
+ -
+
+
+
+
+
+
profile_image: 'sample_profile_image.jpg'
+
+
+
+
+ -
+
+
+
+
+
+
)
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+ -
+ 1
+
+
+
+
+
donation = Donation.create(
+
+
+
+
+ -
+
+
+
+
+
+
name: 'Sample Name',
+
+
+
+
+ -
+
+
+
+
+
+
email: 'donor@example.com',
+
+
+
+
+ -
+
+
+
+
+
+
amount: 200.0,
+
+
+
+
+ -
+
+
+
+
+
+
post_id: 2
+
+
+
+
+ -
+
+
+
+
+
+
)
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+ -
+ 1
+
+
+
+
+
mail = WelcomeMailer.donation_confirmation_email(artist, donation)
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+ -
+ 1
+
+
+
+
+
expect(mail.to).to eq([artist.email])
+
+
+
+
+ -
+
+
+
+
+
+
end
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+ -
+ 1
+
+
+
+
+
it 'renders the sender email' do
+
+
+
+
+ -
+ 1
+
+
+
+
+
artist = Artist.create(
+
+
+
+
+ -
+
+
+
+
+
+
name: 'Alice Johnson',
+
+
+
+
+ -
+
+
+
+
+
+
email: 'alice@example.com',
+
+
+
+
+ -
+
+
+
+
+
+
city: 'Sample City',
+
+
+
+
+ -
+
+
+
+
+
+
state: 'Sample State',
+
+
+
+
+ -
+
+
+
+
+
+
zipcode: '12345',
+
+
+
+
+ -
+
+
+
+
+
+
password_digest: 'sample_password_digest',
+
+
+
+
+ -
+
+
+
+
+
+
medium: 'Sample Medium',
+
+
+
+
+ -
+
+
+
+
+
+
profile_image: 'sample_profile_image.jpg'
+
+
+
+
+ -
+
+
+
+
+
+
)
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+ -
+ 1
+
+
+
+
+
donation = Donation.create(
+
+
+
+
+ -
+
+
+
+
+
+
name: 'Sample Name',
+
+
+
+
+ -
+
+
+
+
+
+
email: 'donor@example.com',
+
+
+
+
+ -
+
+
+
+
+
+
amount: 300.0,
+
+
+
+
+ -
+
+
+
+
+
+
post_id: 3
+
+
+
+
+ -
+
+
+
+
+
+
)
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+ -
+ 1
+
+
+
+
+
mail = WelcomeMailer.donation_confirmation_email(artist, donation)
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+ -
+ 1
+
+
+
+
+
expect(mail.from).to eq(["from@example.com"]) # Make an email for our app and add it here
+
+
+
+
+ -
+
+
+
+
+
+
end
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+ -
+ 1
+
+
+
+
+
it 'assigns artist' do
+
+
+
+
+ -
+ 1
+
+
+
+
+
artist = Artist.create(
+
+
+
+
+ -
+
+
+
+
+
+
name: 'Bob Brown',
+
+
+
+
+ -
+
+
+
+
+
+
email: 'bob@example.com',
+
+
+
+
+ -
+
+
+
+
+
+
city: 'Sample City',
+
+
+
+
+ -
+
+
+
+
+
+
state: 'Sample State',
+
+
+
+
+ -
+
+
+
+
+
+
zipcode: '12345',
+
+
+
+
+ -
+
+
+
+
+
+
password_digest: 'sample_password_digest',
+
+
+
+
+ -
+
+
+
+
+
+
medium: 'Sample Medium',
+
+
+
+
+ -
+
+
+
+
+
+
profile_image: 'sample_profile_image.jpg'
+
+
+
+
+ -
+
+
+
+
+
+
)
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+ -
+ 1
+
+
+
+
+
donation = Donation.create(
+
+
+
+
+ -
+
+
+
+
+
+
name: 'Sample Name',
+
+
+
+
+ -
+
+
+
+
+
+
email: 'donor@example.com',
+
+
+
+
+ -
+
+
+
+
+
+
amount: 400.0,
+
+
+
+
+ -
+
+
+
+
+
+
post_id: 4
+
+
+
+
+ -
+
+
+
+
+
+
)
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+ -
+ 1
+
+
+
+
+
mail = WelcomeMailer.donation_confirmation_email(artist, donation)
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+ -
+ 1
+
+
+
+
+
expect(mail.body.encoded).to match(artist.name)
+
+
+
+
+ -
+
+
+
+
+
+
end
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+ -
+ 1
+
+
+
+
+
it 'assigns donation' do
+
+
+
+
+ -
+ 1
+
+
+
+
+
artist = Artist.create(
+
+
+
+
+ -
+
+
+
+
+
+
name: 'Charlie Davis',
+
+
+
+
+ -
+
+
+
+
+
+
email: 'charlie@example.com',
+
+
+
+
+ -
+
+
+
+
+
+
city: 'Sample City',
+
+
+
+
+ -
+
+
+
+
+
+
state: 'Sample State',
+
+
+
+
+ -
+
+
+
+
+
+
zipcode: '12345',
+
+
+
+
+ -
+
+
+
+
+
+
password_digest: 'sample_password_digest',
+
+
+
+
+ -
+
+
+
+
+
+
medium: 'Sample Medium',
+
+
+
+
+ -
+
+
+
+
+
+
profile_image: 'sample_profile_image.jpg'
+
+
+
+
+ -
+
+
+
+
+
+
)
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+ -
+ 1
+
+
+
+
+
donation = Donation.create(
+
+
+
+
+ -
+
+
+
+
+
+
name: 'Sample Name',
+
+
+
+
+ -
+
+
+
+
+
+
email: 'donor@example.com',
+
+
+
+
+ -
+
+
+
+
+
+
amount: 500.0,
+
+
+
+
+ -
+
+
+
+
+
+
post_id: 5
+
+
+
+
+ -
+
+
+
+
+
+
)
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+ -
+ 1
+
+
+
+
+
mail = WelcomeMailer.donation_confirmation_email(artist, donation)
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+ -
+ 1
+
+
+
+
+
expect(mail.body.encoded).to match(donation.amount.to_s)
+
+
+
+
+ -
+ 1
+
+
+
+
+
expect(mail.body.encoded).to match(donation.post_id.to_s)
+
+
+
+
+ -
+
+
+
+
+
+
end
+
+
+
+
+ -
+
+
+
+
+
+
end
+
+
+
+
+ -
+
+
+
+
+
+
end
+
+
+
+
+
+
+
+
+
spec/models/artist_spec.rb
@@ -10154,7 +11604,7 @@
-
+
spec/models/donation_spec.rb
@@ -10328,7 +11778,7 @@
-
+
spec/models/post_spec.rb
@@ -11129,7 +12579,7 @@
-
+
spec/requests/artists/all_artists_spec.rb
@@ -12689,7 +14139,7 @@
-
+
spec/requests/artists/one_artist_spec.rb
@@ -13765,7 +15215,7 @@
-
+
spec/requests/artists_posts/all_artists_with_posts_spec.rb
@@ -15721,7 +17171,7 @@
-
+
spec/requests/artists_posts/mutation_create_posts_spec.rb
@@ -16500,7 +17950,7 @@
-
+
spec/requests/artists_posts/one_artist_with_posts_spec.rb
@@ -18225,7 +19675,7 @@
-
+
spec/requests/artists_posts/update_post_spec.rb
@@ -19587,7 +21037,7 @@
-
+
spec/requests/donations/create_donation_spec.rb
@@ -19618,7 +21068,7 @@
-
+
spec/requests/donations/mutation_create_donation_spec.rb
@@ -20694,7 +22144,7 @@
-
+
spec/requests/donations/update_donation_spec.rb
@@ -21979,7 +23429,7 @@
-
+
spec/workers/welcome_email_worker_spec.rb
diff --git a/schema.graphql b/schema.graphql
new file mode 100644
index 0000000..c4b1d0e
--- /dev/null
+++ b/schema.graphql
@@ -0,0 +1,206 @@
+type Artist {
+ city: String
+ createdAt: ISO8601DateTime!
+ email: String
+ id: ID!
+ medium: String
+ name: String
+ passwordDigest: String
+ posts(orderBy: PostOrderEnum): [Post!]!
+ profileImage: String
+ state: String
+ updatedAt: ISO8601DateTime!
+ zipcode: String
+}
+
+"""
+Autogenerated input type of CreateDonation
+"""
+input CreateDonationInput {
+ amount: Float!
+
+ """
+ A unique identifier for the client performing the mutation.
+ """
+ clientMutationId: String
+ email: String!
+ name: String!
+ postId: Int!
+}
+
+"""
+Autogenerated return type of CreateDonation.
+"""
+type CreateDonationPayload {
+ """
+ A unique identifier for the client performing the mutation.
+ """
+ clientMutationId: String
+ donation: Donation!
+ errors: [String!]!
+}
+
+"""
+Autogenerated input type of CreatePost
+"""
+input CreatePostInput {
+ artistId: Int!
+
+ """
+ A unique identifier for the client performing the mutation.
+ """
+ clientMutationId: String
+ currentAmount: Float!
+ details: String!
+ imageUrl: String!
+ requestedAmount: Float!
+ title: String!
+}
+
+"""
+Autogenerated return type of CreatePost.
+"""
+type CreatePostPayload {
+ """
+ A unique identifier for the client performing the mutation.
+ """
+ clientMutationId: String
+ errors: [String!]!
+ post: Post!
+}
+
+type Donation {
+ amount: Float
+ createdAt: ISO8601DateTime!
+ email: String
+ id: ID!
+ name: String
+ postId: Int!
+ updatedAt: ISO8601DateTime!
+}
+
+"""
+An ISO 8601-encoded datetime
+"""
+scalar ISO8601DateTime @specifiedBy(url: "https://tools.ietf.org/html/rfc3339")
+
+type Mutation {
+ createDonation(
+ """
+ Parameters for CreateDonation
+ """
+ input: CreateDonationInput!
+ ): CreateDonationPayload
+ createPost(
+ """
+ Parameters for CreatePost
+ """
+ input: CreatePostInput!
+ ): CreatePostPayload
+ updateDonation(
+ """
+ Parameters for UpdateDonation
+ """
+ input: UpdateDonationInput!
+ ): UpdateDonationPayload
+ updatePost(
+ """
+ Parameters for UpdatePost
+ """
+ input: UpdatePostInput!
+ ): UpdatePostPayload
+}
+
+type Post {
+ artistId: Int!
+ createdAt: ISO8601DateTime!
+ currentAmount: Float
+ details: String
+ donationPercentage: Float!
+ donations: [Donation!]!
+ id: ID!
+ imageUrl: String
+ requestedAmount: Float
+ title: String
+ updatedAt: ISO8601DateTime!
+}
+
+enum PostOrderEnum {
+ """
+ Sort by ascending order
+ """
+ ASC
+
+ """
+ Sort by descending order
+ """
+ DESC
+}
+
+type Query {
+ artist(id: ID!): Artist!
+ artists: [Artist!]!
+
+ """
+ Get a list of posts with optional sorting
+ """
+ posts(orderBy: PostOrderEnum): [Post!]!
+}
+
+"""
+Autogenerated input type of UpdateDonation
+"""
+input UpdateDonationInput {
+ amount: Float!
+
+ """
+ A unique identifier for the client performing the mutation.
+ """
+ clientMutationId: String
+ email: String!
+ id: ID!
+ name: String!
+ postId: Int!
+}
+
+"""
+Autogenerated return type of UpdateDonation.
+"""
+type UpdateDonationPayload {
+ """
+ A unique identifier for the client performing the mutation.
+ """
+ clientMutationId: String
+ donation: Donation
+ errors: [String!]!
+}
+
+"""
+Autogenerated input type of UpdatePost
+"""
+input UpdatePostInput {
+ artistId: Int!
+
+ """
+ A unique identifier for the client performing the mutation.
+ """
+ clientMutationId: String
+ currentAmount: Float!
+ details: String!
+ id: ID!
+ imageUrl: String!
+ requestedAmount: Float!
+ title: String!
+}
+
+"""
+Autogenerated return type of UpdatePost.
+"""
+type UpdatePostPayload {
+ """
+ A unique identifier for the client performing the mutation.
+ """
+ clientMutationId: String
+ errors: [String!]!
+ post: Post
+}
diff --git a/schema.json b/schema.json
new file mode 100644
index 0000000..7cd7447
--- /dev/null
+++ b/schema.json
@@ -0,0 +1,2764 @@
+{
+ "data": {
+ "__schema": {
+ "queryType": {
+ "name": "Query"
+ },
+ "mutationType": {
+ "name": "Mutation"
+ },
+ "subscriptionType": null,
+ "types": [
+ {
+ "kind": "OBJECT",
+ "name": "Artist",
+ "description": null,
+ "interfaces": [
+
+ ],
+ "possibleTypes": null,
+ "fields": [
+ {
+ "name": "city",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "createdAt",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "ISO8601DateTime",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "email",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "id",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "ID",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "medium",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "name",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "passwordDigest",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "posts",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "OBJECT",
+ "name": "Post",
+ "ofType": null
+ }
+ }
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+ {
+ "name": "orderBy",
+ "description": null,
+ "type": {
+ "kind": "ENUM",
+ "name": "PostOrderEnum",
+ "ofType": null
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ]
+ },
+ {
+ "name": "profileImage",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "state",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "updatedAt",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "ISO8601DateTime",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "zipcode",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ }
+ ],
+ "inputFields": null,
+ "enumValues": null
+ },
+ {
+ "kind": "SCALAR",
+ "name": "Boolean",
+ "description": "Represents `true` or `false` values.",
+ "interfaces": null,
+ "possibleTypes": null,
+ "fields": null,
+ "inputFields": null,
+ "enumValues": null
+ },
+ {
+ "kind": "INPUT_OBJECT",
+ "name": "CreateDonationInput",
+ "description": "Autogenerated input type of CreateDonation",
+ "interfaces": null,
+ "possibleTypes": null,
+ "fields": null,
+ "inputFields": [
+ {
+ "name": "clientMutationId",
+ "description": "A unique identifier for the client performing the mutation.",
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "amount",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Float",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "postId",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Int",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "name",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "email",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ],
+ "enumValues": null
+ },
+ {
+ "kind": "OBJECT",
+ "name": "CreateDonationPayload",
+ "description": "Autogenerated return type of CreateDonation.",
+ "interfaces": [
+
+ ],
+ "possibleTypes": null,
+ "fields": [
+ {
+ "name": "clientMutationId",
+ "description": "A unique identifier for the client performing the mutation.",
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "donation",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "OBJECT",
+ "name": "Donation",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "errors",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ }
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ }
+ ],
+ "inputFields": null,
+ "enumValues": null
+ },
+ {
+ "kind": "INPUT_OBJECT",
+ "name": "CreatePostInput",
+ "description": "Autogenerated input type of CreatePost",
+ "interfaces": null,
+ "possibleTypes": null,
+ "fields": null,
+ "inputFields": [
+ {
+ "name": "clientMutationId",
+ "description": "A unique identifier for the client performing the mutation.",
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "title",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "details",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "imageUrl",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "requestedAmount",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Float",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "currentAmount",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Float",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "artistId",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Int",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ],
+ "enumValues": null
+ },
+ {
+ "kind": "OBJECT",
+ "name": "CreatePostPayload",
+ "description": "Autogenerated return type of CreatePost.",
+ "interfaces": [
+
+ ],
+ "possibleTypes": null,
+ "fields": [
+ {
+ "name": "clientMutationId",
+ "description": "A unique identifier for the client performing the mutation.",
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "errors",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ }
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "post",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "OBJECT",
+ "name": "Post",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ }
+ ],
+ "inputFields": null,
+ "enumValues": null
+ },
+ {
+ "kind": "OBJECT",
+ "name": "Donation",
+ "description": null,
+ "interfaces": [
+
+ ],
+ "possibleTypes": null,
+ "fields": [
+ {
+ "name": "amount",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "Float",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "createdAt",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "ISO8601DateTime",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "email",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "id",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "ID",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "name",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "postId",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Int",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "updatedAt",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "ISO8601DateTime",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ }
+ ],
+ "inputFields": null,
+ "enumValues": null
+ },
+ {
+ "kind": "SCALAR",
+ "name": "Float",
+ "description": "Represents signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point).",
+ "interfaces": null,
+ "possibleTypes": null,
+ "fields": null,
+ "inputFields": null,
+ "enumValues": null
+ },
+ {
+ "kind": "SCALAR",
+ "name": "ID",
+ "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
+ "interfaces": null,
+ "possibleTypes": null,
+ "fields": null,
+ "inputFields": null,
+ "enumValues": null
+ },
+ {
+ "kind": "SCALAR",
+ "name": "ISO8601DateTime",
+ "description": "An ISO 8601-encoded datetime",
+ "interfaces": null,
+ "possibleTypes": null,
+ "fields": null,
+ "inputFields": null,
+ "enumValues": null
+ },
+ {
+ "kind": "SCALAR",
+ "name": "Int",
+ "description": "Represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.",
+ "interfaces": null,
+ "possibleTypes": null,
+ "fields": null,
+ "inputFields": null,
+ "enumValues": null
+ },
+ {
+ "kind": "OBJECT",
+ "name": "Mutation",
+ "description": null,
+ "interfaces": [
+
+ ],
+ "possibleTypes": null,
+ "fields": [
+ {
+ "name": "createDonation",
+ "description": null,
+ "type": {
+ "kind": "OBJECT",
+ "name": "CreateDonationPayload",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+ {
+ "name": "input",
+ "description": "Parameters for CreateDonation",
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "INPUT_OBJECT",
+ "name": "CreateDonationInput",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ]
+ },
+ {
+ "name": "createPost",
+ "description": null,
+ "type": {
+ "kind": "OBJECT",
+ "name": "CreatePostPayload",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+ {
+ "name": "input",
+ "description": "Parameters for CreatePost",
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "INPUT_OBJECT",
+ "name": "CreatePostInput",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ]
+ },
+ {
+ "name": "updateDonation",
+ "description": null,
+ "type": {
+ "kind": "OBJECT",
+ "name": "UpdateDonationPayload",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+ {
+ "name": "input",
+ "description": "Parameters for UpdateDonation",
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "INPUT_OBJECT",
+ "name": "UpdateDonationInput",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ]
+ },
+ {
+ "name": "updatePost",
+ "description": null,
+ "type": {
+ "kind": "OBJECT",
+ "name": "UpdatePostPayload",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+ {
+ "name": "input",
+ "description": "Parameters for UpdatePost",
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "INPUT_OBJECT",
+ "name": "UpdatePostInput",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ]
+ }
+ ],
+ "inputFields": null,
+ "enumValues": null
+ },
+ {
+ "kind": "OBJECT",
+ "name": "Post",
+ "description": null,
+ "interfaces": [
+
+ ],
+ "possibleTypes": null,
+ "fields": [
+ {
+ "name": "artistId",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Int",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "createdAt",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "ISO8601DateTime",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "currentAmount",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "Float",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "details",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "donationPercentage",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Float",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "donations",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "OBJECT",
+ "name": "Donation",
+ "ofType": null
+ }
+ }
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "id",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "ID",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "imageUrl",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "requestedAmount",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "Float",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "title",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "updatedAt",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "ISO8601DateTime",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ }
+ ],
+ "inputFields": null,
+ "enumValues": null
+ },
+ {
+ "kind": "ENUM",
+ "name": "PostOrderEnum",
+ "description": null,
+ "interfaces": null,
+ "possibleTypes": null,
+ "fields": null,
+ "inputFields": null,
+ "enumValues": [
+ {
+ "name": "ASC",
+ "description": "Sort by ascending order",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "DESC",
+ "description": "Sort by descending order",
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ]
+ },
+ {
+ "kind": "OBJECT",
+ "name": "Query",
+ "description": null,
+ "interfaces": [
+
+ ],
+ "possibleTypes": null,
+ "fields": [
+ {
+ "name": "artist",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "OBJECT",
+ "name": "Artist",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+ {
+ "name": "id",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "ID",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ]
+ },
+ {
+ "name": "artists",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "OBJECT",
+ "name": "Artist",
+ "ofType": null
+ }
+ }
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "posts",
+ "description": "Get a list of posts with optional sorting",
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "OBJECT",
+ "name": "Post",
+ "ofType": null
+ }
+ }
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+ {
+ "name": "orderBy",
+ "description": null,
+ "type": {
+ "kind": "ENUM",
+ "name": "PostOrderEnum",
+ "ofType": null
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ]
+ }
+ ],
+ "inputFields": null,
+ "enumValues": null
+ },
+ {
+ "kind": "SCALAR",
+ "name": "String",
+ "description": "Represents textual data as UTF-8 character sequences. This type is most often used by GraphQL to represent free-form human-readable text.",
+ "interfaces": null,
+ "possibleTypes": null,
+ "fields": null,
+ "inputFields": null,
+ "enumValues": null
+ },
+ {
+ "kind": "INPUT_OBJECT",
+ "name": "UpdateDonationInput",
+ "description": "Autogenerated input type of UpdateDonation",
+ "interfaces": null,
+ "possibleTypes": null,
+ "fields": null,
+ "inputFields": [
+ {
+ "name": "clientMutationId",
+ "description": "A unique identifier for the client performing the mutation.",
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "id",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "ID",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "name",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "email",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "amount",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Float",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "postId",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Int",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ],
+ "enumValues": null
+ },
+ {
+ "kind": "OBJECT",
+ "name": "UpdateDonationPayload",
+ "description": "Autogenerated return type of UpdateDonation.",
+ "interfaces": [
+
+ ],
+ "possibleTypes": null,
+ "fields": [
+ {
+ "name": "clientMutationId",
+ "description": "A unique identifier for the client performing the mutation.",
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "donation",
+ "description": null,
+ "type": {
+ "kind": "OBJECT",
+ "name": "Donation",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "errors",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ }
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ }
+ ],
+ "inputFields": null,
+ "enumValues": null
+ },
+ {
+ "kind": "INPUT_OBJECT",
+ "name": "UpdatePostInput",
+ "description": "Autogenerated input type of UpdatePost",
+ "interfaces": null,
+ "possibleTypes": null,
+ "fields": null,
+ "inputFields": [
+ {
+ "name": "clientMutationId",
+ "description": "A unique identifier for the client performing the mutation.",
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "id",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "ID",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "title",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "details",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "imageUrl",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "requestedAmount",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Float",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "currentAmount",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Float",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "artistId",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Int",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ],
+ "enumValues": null
+ },
+ {
+ "kind": "OBJECT",
+ "name": "UpdatePostPayload",
+ "description": "Autogenerated return type of UpdatePost.",
+ "interfaces": [
+
+ ],
+ "possibleTypes": null,
+ "fields": [
+ {
+ "name": "clientMutationId",
+ "description": "A unique identifier for the client performing the mutation.",
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "errors",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ }
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "post",
+ "description": null,
+ "type": {
+ "kind": "OBJECT",
+ "name": "Post",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ }
+ ],
+ "inputFields": null,
+ "enumValues": null
+ },
+ {
+ "kind": "OBJECT",
+ "name": "__Directive",
+ "description": "A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.\n\nIn some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.",
+ "interfaces": [
+
+ ],
+ "possibleTypes": null,
+ "fields": [
+ {
+ "name": "args",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "OBJECT",
+ "name": "__InputValue",
+ "ofType": null
+ }
+ }
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+ {
+ "name": "includeDeprecated",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "Boolean",
+ "ofType": null
+ },
+ "defaultValue": "false",
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ]
+ },
+ {
+ "name": "description",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "isRepeatable",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "Boolean",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "locations",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "ENUM",
+ "name": "__DirectiveLocation",
+ "ofType": null
+ }
+ }
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "name",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "onField",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Boolean",
+ "ofType": null
+ }
+ },
+ "isDeprecated": true,
+ "deprecationReason": "Use `locations`.",
+ "args": [
+
+ ]
+ },
+ {
+ "name": "onFragment",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Boolean",
+ "ofType": null
+ }
+ },
+ "isDeprecated": true,
+ "deprecationReason": "Use `locations`.",
+ "args": [
+
+ ]
+ },
+ {
+ "name": "onOperation",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Boolean",
+ "ofType": null
+ }
+ },
+ "isDeprecated": true,
+ "deprecationReason": "Use `locations`.",
+ "args": [
+
+ ]
+ }
+ ],
+ "inputFields": null,
+ "enumValues": null
+ },
+ {
+ "kind": "ENUM",
+ "name": "__DirectiveLocation",
+ "description": "A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.",
+ "interfaces": null,
+ "possibleTypes": null,
+ "fields": null,
+ "inputFields": null,
+ "enumValues": [
+ {
+ "name": "QUERY",
+ "description": "Location adjacent to a query operation.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "MUTATION",
+ "description": "Location adjacent to a mutation operation.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "SUBSCRIPTION",
+ "description": "Location adjacent to a subscription operation.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "FIELD",
+ "description": "Location adjacent to a field.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "FRAGMENT_DEFINITION",
+ "description": "Location adjacent to a fragment definition.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "FRAGMENT_SPREAD",
+ "description": "Location adjacent to a fragment spread.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "INLINE_FRAGMENT",
+ "description": "Location adjacent to an inline fragment.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "SCHEMA",
+ "description": "Location adjacent to a schema definition.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "SCALAR",
+ "description": "Location adjacent to a scalar definition.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "OBJECT",
+ "description": "Location adjacent to an object type definition.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "FIELD_DEFINITION",
+ "description": "Location adjacent to a field definition.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "ARGUMENT_DEFINITION",
+ "description": "Location adjacent to an argument definition.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "INTERFACE",
+ "description": "Location adjacent to an interface definition.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "UNION",
+ "description": "Location adjacent to a union definition.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "ENUM",
+ "description": "Location adjacent to an enum definition.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "ENUM_VALUE",
+ "description": "Location adjacent to an enum value definition.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "INPUT_OBJECT",
+ "description": "Location adjacent to an input object type definition.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "INPUT_FIELD_DEFINITION",
+ "description": "Location adjacent to an input object field definition.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "VARIABLE_DEFINITION",
+ "description": "Location adjacent to a variable definition.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ]
+ },
+ {
+ "kind": "OBJECT",
+ "name": "__EnumValue",
+ "description": "One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.",
+ "interfaces": [
+
+ ],
+ "possibleTypes": null,
+ "fields": [
+ {
+ "name": "deprecationReason",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "description",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "isDeprecated",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Boolean",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "name",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ }
+ ],
+ "inputFields": null,
+ "enumValues": null
+ },
+ {
+ "kind": "OBJECT",
+ "name": "__Field",
+ "description": "Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.",
+ "interfaces": [
+
+ ],
+ "possibleTypes": null,
+ "fields": [
+ {
+ "name": "args",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "OBJECT",
+ "name": "__InputValue",
+ "ofType": null
+ }
+ }
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+ {
+ "name": "includeDeprecated",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "Boolean",
+ "ofType": null
+ },
+ "defaultValue": "false",
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ]
+ },
+ {
+ "name": "deprecationReason",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "description",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "isDeprecated",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Boolean",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "name",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "type",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "OBJECT",
+ "name": "__Type",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ }
+ ],
+ "inputFields": null,
+ "enumValues": null
+ },
+ {
+ "kind": "OBJECT",
+ "name": "__InputValue",
+ "description": "Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.",
+ "interfaces": [
+
+ ],
+ "possibleTypes": null,
+ "fields": [
+ {
+ "name": "defaultValue",
+ "description": "A GraphQL-formatted string representing the default value for this input value.",
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "deprecationReason",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "description",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "isDeprecated",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Boolean",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "name",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "type",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "OBJECT",
+ "name": "__Type",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ }
+ ],
+ "inputFields": null,
+ "enumValues": null
+ },
+ {
+ "kind": "OBJECT",
+ "name": "__Schema",
+ "description": "A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.",
+ "interfaces": [
+
+ ],
+ "possibleTypes": null,
+ "fields": [
+ {
+ "name": "description",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "directives",
+ "description": "A list of all directives supported by this server.",
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "OBJECT",
+ "name": "__Directive",
+ "ofType": null
+ }
+ }
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "mutationType",
+ "description": "If this server supports mutation, the type that mutation operations will be rooted at.",
+ "type": {
+ "kind": "OBJECT",
+ "name": "__Type",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "queryType",
+ "description": "The type that query operations will be rooted at.",
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "OBJECT",
+ "name": "__Type",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "subscriptionType",
+ "description": "If this server support subscription, the type that subscription operations will be rooted at.",
+ "type": {
+ "kind": "OBJECT",
+ "name": "__Type",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "types",
+ "description": "A list of all types supported by this server.",
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "OBJECT",
+ "name": "__Type",
+ "ofType": null
+ }
+ }
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ }
+ ],
+ "inputFields": null,
+ "enumValues": null
+ },
+ {
+ "kind": "OBJECT",
+ "name": "__Type",
+ "description": "The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name and description, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.",
+ "interfaces": [
+
+ ],
+ "possibleTypes": null,
+ "fields": [
+ {
+ "name": "description",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "enumValues",
+ "description": null,
+ "type": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "OBJECT",
+ "name": "__EnumValue",
+ "ofType": null
+ }
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+ {
+ "name": "includeDeprecated",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "Boolean",
+ "ofType": null
+ },
+ "defaultValue": "false",
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ]
+ },
+ {
+ "name": "fields",
+ "description": null,
+ "type": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "OBJECT",
+ "name": "__Field",
+ "ofType": null
+ }
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+ {
+ "name": "includeDeprecated",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "Boolean",
+ "ofType": null
+ },
+ "defaultValue": "false",
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ]
+ },
+ {
+ "name": "inputFields",
+ "description": null,
+ "type": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "OBJECT",
+ "name": "__InputValue",
+ "ofType": null
+ }
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+ {
+ "name": "includeDeprecated",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "Boolean",
+ "ofType": null
+ },
+ "defaultValue": "false",
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ]
+ },
+ {
+ "name": "interfaces",
+ "description": null,
+ "type": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "OBJECT",
+ "name": "__Type",
+ "ofType": null
+ }
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "isOneOf",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Boolean",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "kind",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "ENUM",
+ "name": "__TypeKind",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "name",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "ofType",
+ "description": null,
+ "type": {
+ "kind": "OBJECT",
+ "name": "__Type",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "possibleTypes",
+ "description": null,
+ "type": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "OBJECT",
+ "name": "__Type",
+ "ofType": null
+ }
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "specifiedByURL",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ }
+ ],
+ "inputFields": null,
+ "enumValues": null
+ },
+ {
+ "kind": "ENUM",
+ "name": "__TypeKind",
+ "description": "An enum describing what kind of type a given `__Type` is.",
+ "interfaces": null,
+ "possibleTypes": null,
+ "fields": null,
+ "inputFields": null,
+ "enumValues": [
+ {
+ "name": "SCALAR",
+ "description": "Indicates this type is a scalar.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "OBJECT",
+ "description": "Indicates this type is an object. `fields` and `interfaces` are valid fields.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "INTERFACE",
+ "description": "Indicates this type is an interface. `fields` and `possibleTypes` are valid fields.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "UNION",
+ "description": "Indicates this type is a union. `possibleTypes` is a valid field.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "ENUM",
+ "description": "Indicates this type is an enum. `enumValues` is a valid field.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "INPUT_OBJECT",
+ "description": "Indicates this type is an input object. `inputFields` is a valid field.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "LIST",
+ "description": "Indicates this type is a list. `ofType` is a valid field.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "NON_NULL",
+ "description": "Indicates this type is a non-null. `ofType` is a valid field.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ]
+ }
+ ],
+ "directives": [
+ {
+ "name": "include",
+ "description": "Directs the executor to include this field or fragment only when the `if` argument is true.",
+ "locations": [
+ "FIELD",
+ "FRAGMENT_SPREAD",
+ "INLINE_FRAGMENT"
+ ],
+ "args": [
+ {
+ "name": "if",
+ "description": "Included when true.",
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Boolean",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ]
+ },
+ {
+ "name": "skip",
+ "description": "Directs the executor to skip this field or fragment when the `if` argument is true.",
+ "locations": [
+ "FIELD",
+ "FRAGMENT_SPREAD",
+ "INLINE_FRAGMENT"
+ ],
+ "args": [
+ {
+ "name": "if",
+ "description": "Skipped when true.",
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Boolean",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ]
+ },
+ {
+ "name": "deprecated",
+ "description": "Marks an element of a GraphQL schema as no longer supported.",
+ "locations": [
+ "FIELD_DEFINITION",
+ "ENUM_VALUE",
+ "ARGUMENT_DEFINITION",
+ "INPUT_FIELD_DEFINITION"
+ ],
+ "args": [
+ {
+ "name": "reason",
+ "description": "Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted in [Markdown](https://daringfireball.net/projects/markdown/).",
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "defaultValue": "\"No longer supported\"",
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ]
+ },
+ {
+ "name": "oneOf",
+ "description": "Requires that exactly one field must be supplied and that field must not be `null`.",
+ "locations": [
+ "INPUT_OBJECT"
+ ],
+ "args": [
+
+ ]
+ },
+ {
+ "name": "specifiedBy",
+ "description": "Exposes a URL that specifies the behavior of this scalar.",
+ "locations": [
+ "SCALAR"
+ ],
+ "args": [
+ {
+ "name": "url",
+ "description": "The URL that specifies the behavior of this scalar.",
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ]
+ }
+ ]
+ }
+ }
+}
diff --git a/spec/graphql/app_schema_spec.rb b/spec/graphql/app_schema_spec.rb
new file mode 100644
index 0000000..6210d63
--- /dev/null
+++ b/spec/graphql/app_schema_spec.rb
@@ -0,0 +1,12 @@
+require 'rails_helper'
+
+RSpec.describe GearUpBeSchema, type: :graphql do
+ it 'matches the dumped schema (rails graphql:schema:dump)' do
+ aggregate_failures do
+ expected = described_class.to_definition.gsub(/\s+/, ' ')
+ actual = File.read(Rails.root.join('schema.graphql')).gsub(/\s+/, ' ')
+
+ expect(expected).to eq(actual)
+ end
+ end
+end
diff --git a/spec/support/graphql_helpers.rb b/spec/support/graphql_helpers.rb
new file mode 100644
index 0000000..41b0a24
--- /dev/null
+++ b/spec/support/graphql_helpers.rb
@@ -0,0 +1,14 @@
+module GraphQLHelpers
+ def controller
+ @controller ||= GraphqlController.new.tap do |obj|
+ obj.set_request! ActionDispatch::Request.new({})
+ end
+ end
+
+ def execute_graphql(query, **kwargs)
+ GearUpBeSchema.execute(
+ query,
+ { context: { controller: controller } }.merge(kwargs),
+ )
+ end
+end
- app/controllers/application_controller.rb
+ app/controllers/application_controller.rb
100.00 %
2
1
@@ -82,7 +82,7 @@
- app/controllers/graphql_controller.rb
+ app/controllers/graphql_controller.rb
56.00 %
54
25
@@ -93,7 +93,7 @@
- app/graphql/gear_up_be_schema.rb
+ app/graphql/gear_up_be_schema.rb
69.23 %
42
13
@@ -104,7 +104,7 @@
- app/graphql/mutations/base_mutation.rb
+ app/graphql/mutations/base_mutation.rb
100.00 %
10
6
@@ -115,7 +115,7 @@
- app/graphql/mutations/create_donation.rb
+ app/graphql/mutations/create_donation.rb
93.75 %
33
16
@@ -126,7 +126,7 @@
- app/graphql/mutations/create_post.rb
+ app/graphql/mutations/create_post.rb
93.75 %
43
16
@@ -137,7 +137,7 @@
- app/graphql/mutations/update_donation.rb
+ app/graphql/mutations/update_donation.rb
92.86 %
33
14
@@ -148,7 +148,7 @@
- app/graphql/mutations/update_post.rb
+ app/graphql/mutations/update_post.rb
93.75 %
37
16
@@ -159,7 +159,7 @@
- app/graphql/types/artist_type.rb
+ app/graphql/types/artist_type.rb
95.45 %
33
22
@@ -170,7 +170,7 @@
- app/graphql/types/base_argument.rb
+ app/graphql/types/base_argument.rb
100.00 %
6
2
@@ -181,7 +181,7 @@
- app/graphql/types/base_connection.rb
+ app/graphql/types/base_connection.rb
100.00 %
8
3
@@ -192,7 +192,7 @@
- app/graphql/types/base_edge.rb
+ app/graphql/types/base_edge.rb
100.00 %
8
3
@@ -203,7 +203,7 @@
- app/graphql/types/base_field.rb
+ app/graphql/types/base_field.rb
100.00 %
7
3
@@ -214,7 +214,7 @@
- app/graphql/types/base_input_object.rb
+ app/graphql/types/base_input_object.rb
100.00 %
7
3
@@ -225,7 +225,7 @@
- app/graphql/types/base_interface.rb
+ app/graphql/types/base_interface.rb
100.00 %
11
6
@@ -236,7 +236,7 @@
- app/graphql/types/base_object.rb
+ app/graphql/types/base_object.rb
100.00 %
9
5
@@ -247,7 +247,7 @@
- app/graphql/types/donation_type.rb
+ app/graphql/types/donation_type.rb
100.00 %
13
9
@@ -258,7 +258,7 @@
- app/graphql/types/mutation_type.rb
+ app/graphql/types/mutation_type.rb
100.00 %
10
6
@@ -269,7 +269,7 @@
- app/graphql/types/node_type.rb
+ app/graphql/types/node_type.rb
100.00 %
9
4
@@ -280,7 +280,7 @@
- app/graphql/types/post_order_enum.rb
+ app/graphql/types/post_order_enum.rb
100.00 %
6
4
@@ -291,7 +291,7 @@
- app/graphql/types/post_type.rb
+ app/graphql/types/post_type.rb
100.00 %
26
17
@@ -302,7 +302,7 @@
- app/graphql/types/query_type.rb
+ app/graphql/types/query_type.rb
70.37 %
52
27
@@ -313,7 +313,7 @@
- app/helpers/application_helper.rb
+ app/helpers/application_helper.rb
100.00 %
2
1
@@ -324,7 +324,7 @@
- app/mailers/application_mailer.rb
+ app/mailers/application_mailer.rb
100.00 %
4
3
@@ -335,7 +335,7 @@
- app/mailers/welcome_mailer.rb
+ app/mailers/welcome_mailer.rb
100.00 %
9
5
@@ -346,7 +346,7 @@
- app/models/application_record.rb
+ app/models/application_record.rb
100.00 %
3
2
@@ -357,7 +357,7 @@
- app/models/artist.rb
+ app/models/artist.rb
100.00 %
7
4
@@ -368,7 +368,7 @@
- app/models/donation.rb
+ app/models/donation.rb
100.00 %
4
3
@@ -379,7 +379,7 @@
- app/models/post.rb
+ app/models/post.rb
100.00 %
21
9
@@ -390,7 +390,7 @@
- app/workers/welcome_email_worker.rb
+ app/workers/welcome_email_worker.rb
100.00 %
9
6
@@ -401,7 +401,7 @@
- config/application.rb
+ config/application.rb
100.00 %
37
15
@@ -412,7 +412,7 @@
- config/boot.rb
+ config/boot.rb
100.00 %
4
3
@@ -423,7 +423,7 @@
- config/environment.rb
+ config/environment.rb
100.00 %
5
2
@@ -434,7 +434,7 @@
- config/environments/test.rb
+ config/environments/test.rb
100.00 %
60
17
@@ -445,7 +445,7 @@
- config/initializers/assets.rb
+ config/initializers/assets.rb
100.00 %
12
1
@@ -456,7 +456,7 @@
- config/initializers/content_security_policy.rb
+ config/initializers/content_security_policy.rb
100.00 %
25
0
@@ -467,7 +467,7 @@
- config/initializers/cors.rb
+ config/initializers/cors.rb
100.00 %
9
4
@@ -478,7 +478,7 @@
- config/initializers/filter_parameter_logging.rb
+ config/initializers/filter_parameter_logging.rb
100.00 %
8
1
@@ -489,7 +489,7 @@
- config/initializers/inflections.rb
+ config/initializers/inflections.rb
100.00 %
16
0
@@ -500,7 +500,7 @@
- config/initializers/permissions_policy.rb
+ config/initializers/permissions_policy.rb
100.00 %
11
0
@@ -511,7 +511,7 @@
- config/initializers/sidekiq.rb
+ config/initializers/sidekiq.rb
75.00 %
7
4
@@ -522,7 +522,7 @@
- config/routes.rb
+ config/routes.rb
83.33 %
11
6
@@ -533,7 +533,18 @@
- spec/models/artist_spec.rb
+ spec/mailers/welcome_mailer_spec.rb
+ 100.00 %
+ 128
+ 29
+ 29
+ 0
+ 1.00
+
+
+
+
+ spec/models/artist_spec.rb
100.00 %
16
11
@@ -544,7 +555,7 @@
- spec/models/donation_spec.rb
+ spec/models/donation_spec.rb
100.00 %
13
8
@@ -555,7 +566,7 @@
- spec/models/post_spec.rb
+ spec/models/post_spec.rb
100.00 %
70
27
@@ -566,7 +577,7 @@
- spec/requests/artists/all_artists_spec.rb
+ spec/requests/artists/all_artists_spec.rb
100.00 %
139
61
@@ -577,7 +588,7 @@
- spec/requests/artists/one_artist_spec.rb
+ spec/requests/artists/one_artist_spec.rb
100.00 %
95
43
@@ -588,7 +599,7 @@
- spec/requests/artists_posts/all_artists_with_posts_spec.rb
+ spec/requests/artists_posts/all_artists_with_posts_spec.rb
100.00 %
175
81
@@ -599,7 +610,7 @@
- spec/requests/artists_posts/mutation_create_posts_spec.rb
+ spec/requests/artists_posts/mutation_create_posts_spec.rb
100.00 %
68
22
@@ -610,7 +621,7 @@
- spec/requests/artists_posts/one_artist_with_posts_spec.rb
+ spec/requests/artists_posts/one_artist_with_posts_spec.rb
100.00 %
154
65
@@ -621,7 +632,7 @@
- spec/requests/artists_posts/update_post_spec.rb
+ spec/requests/artists_posts/update_post_spec.rb
100.00 %
121
42
@@ -632,7 +643,7 @@
- spec/requests/donations/create_donation_spec.rb
+ spec/requests/donations/create_donation_spec.rb
100.00 %
0
0
@@ -643,7 +654,7 @@
- spec/requests/donations/mutation_create_donation_spec.rb
+ spec/requests/donations/mutation_create_donation_spec.rb
100.00 %
95
31
@@ -654,7 +665,7 @@
- spec/requests/donations/update_donation_spec.rb
+ spec/requests/donations/update_donation_spec.rb
100.00 %
114
36
@@ -665,7 +676,7 @@
- spec/workers/welcome_email_worker_spec.rb
+ spec/workers/welcome_email_worker_spec.rb
100.00 %
49
16
@@ -692,7 +703,7 @@
-
+
app/controllers/application_controller.rb
@@ -745,7 +756,7 @@
-
+
app/controllers/graphql_controller.rb
@@ -1370,7 +1381,7 @@
-
+
app/graphql/gear_up_be_schema.rb
@@ -1863,7 +1874,7 @@
-
+
app/graphql/mutations/base_mutation.rb
@@ -2004,7 +2015,7 @@
-
+
app/graphql/mutations/create_donation.rb
@@ -2398,7 +2409,7 @@
-
+
app/graphql/mutations/create_post.rb
@@ -2902,7 +2913,7 @@
-
+
app/graphql/mutations/update_donation.rb
@@ -3296,7 +3307,7 @@
-
+
app/graphql/mutations/update_post.rb
@@ -3734,7 +3745,7 @@
-
+
app/graphql/types/artist_type.rb
@@ -4128,7 +4139,7 @@
-
+
app/graphql/types/base_argument.rb
@@ -4225,7 +4236,7 @@
-
+
app/graphql/types/base_connection.rb
@@ -4344,7 +4355,7 @@
-
+
app/graphql/types/base_edge.rb
@@ -4463,7 +4474,7 @@
-
+
app/graphql/types/base_field.rb
@@ -4571,7 +4582,7 @@
-
+
app/graphql/types/base_input_object.rb
@@ -4679,7 +4690,7 @@
-
+
app/graphql/types/base_interface.rb
@@ -4831,7 +4842,7 @@
-
+
app/graphql/types/base_object.rb
@@ -4961,7 +4972,7 @@
-
+
app/graphql/types/donation_type.rb
@@ -5135,7 +5146,7 @@
-
+
app/graphql/types/mutation_type.rb
@@ -5276,7 +5287,7 @@
-
+
app/graphql/types/node_type.rb
@@ -5406,7 +5417,7 @@
-
+
app/graphql/types/post_order_enum.rb
@@ -5503,7 +5514,7 @@
-
+
app/graphql/types/post_type.rb
@@ -5820,7 +5831,7 @@
-
+
app/graphql/types/query_type.rb
@@ -6423,7 +6434,7 @@
-
+
app/helpers/application_helper.rb
@@ -6476,7 +6487,7 @@
-
+
app/mailers/application_mailer.rb
@@ -6551,7 +6562,7 @@
-
+
app/mailers/welcome_mailer.rb
@@ -6681,7 +6692,7 @@
-
+
app/models/application_record.rb
@@ -6745,7 +6756,7 @@
-
+
app/models/artist.rb
@@ -6853,7 +6864,7 @@
-
+
app/models/donation.rb
@@ -6928,7 +6939,7 @@
-
+
app/models/post.rb
@@ -7190,7 +7201,7 @@
-
+
app/workers/welcome_email_worker.rb
@@ -7320,7 +7331,7 @@
-
+
config/application.rb
@@ -7758,7 +7769,7 @@
-
+
config/boot.rb
@@ -7833,7 +7844,7 @@
-
+
config/environment.rb
@@ -7919,7 +7930,7 @@
-
+
config/environments/test.rb
@@ -8610,7 +8621,7 @@
-
+
config/initializers/assets.rb
@@ -8773,7 +8784,7 @@
-
+
config/initializers/content_security_policy.rb
@@ -9079,7 +9090,7 @@
-
+
config/initializers/cors.rb
@@ -9209,7 +9220,7 @@
-
+
config/initializers/filter_parameter_logging.rb
@@ -9328,7 +9339,7 @@
-
+
config/initializers/inflections.rb
@@ -9535,7 +9546,7 @@
-
+
config/initializers/permissions_policy.rb
@@ -9687,7 +9698,7 @@
-
+
config/initializers/sidekiq.rb
@@ -9795,7 +9806,7 @@
-
+
config/routes.rb
@@ -9947,7 +9958,1446 @@
-
+
+
+ spec/mailers/welcome_mailer_spec.rb
+
+
+ 100.0%
+
+
+ lines covered
+
+
+
+
+
+ 29 relevant lines.
+ 29 lines covered and
+ 0 lines missed.
+
+
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
# spec/mailers/welcome_mailer_spec.rb
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+ -
+ 1
+
+
+
+
+
require 'rails_helper'
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+ -
+ 1
+
+
+
+
+
RSpec.describe WelcomeMailer, type: :mailer do
+
+
+
+
+ -
+ 1
+
+
+
+
+
describe 'donation_confirmation_email' do
+
+
+
+
+ -
+ 1
+
+
+
+
+
it 'renders the subject' do
+
+
+
+
+ -
+ 1
+
+
+
+
+
artist = Artist.create(
+
+
+
+
+ -
+
+
+
+
+
+
name: 'John Doe',
+
+
+
+
+ -
+
+
+
+
+
+
email: 'john@example.com',
+
+
+
+
+ -
+
+
+
+
+
+
city: 'Sample City',
+
+
+
+
+ -
+
+
+
+
+
+
state: 'Sample State',
+
+
+
+
+ -
+
+
+
+
+
+
zipcode: '12345',
+
+
+
+
+ -
+
+
+
+
+
+
password_digest: 'sample_password_digest',
+
+
+
+
+ -
+
+
+
+
+
+
medium: 'Sample Medium',
+
+
+
+
+ -
+
+
+
+
+
+
profile_image: 'sample_profile_image.jpg'
+
+
+
+
+ -
+
+
+
+
+
+
)
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+ -
+ 1
+
+
+
+
+
donation = Donation.create(
+
+
+
+
+ -
+
+
+
+
+
+
name: 'Sample Name',
+
+
+
+
+ -
+
+
+
+
+
+
email: 'donor@example.com',
+
+
+
+
+ -
+
+
+
+
+
+
amount: 100.0,
+
+
+
+
+ -
+
+
+
+
+
+
post_id: 1
+
+
+
+
+ -
+
+
+
+
+
+
)
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+ -
+ 1
+
+
+
+
+
mail = WelcomeMailer.donation_confirmation_email(artist, donation)
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+ -
+ 1
+
+
+
+
+
expect(mail.subject).to eq('Donation Confirmation')
+
+
+
+
+ -
+
+
+
+
+
+
end
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+ -
+ 1
+
+
+
+
+
it 'renders the receiver email' do
+
+
+
+
+ -
+ 1
+
+
+
+
+
artist = Artist.create(
+
+
+
+
+ -
+
+
+
+
+
+
name: 'Jane Smith',
+
+
+
+
+ -
+
+
+
+
+
+
email: 'jane@example.com',
+
+
+
+
+ -
+
+
+
+
+
+
city: 'Sample City',
+
+
+
+
+ -
+
+
+
+
+
+
state: 'Sample State',
+
+
+
+
+ -
+
+
+
+
+
+
zipcode: '12345',
+
+
+
+
+ -
+
+
+
+
+
+
password_digest: 'sample_password_digest',
+
+
+
+
+ -
+
+
+
+
+
+
medium: 'Sample Medium',
+
+
+
+
+ -
+
+
+
+
+
+
profile_image: 'sample_profile_image.jpg'
+
+
+
+
+ -
+
+
+
+
+
+
)
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+ -
+ 1
+
+
+
+
+
donation = Donation.create(
+
+
+
+
+ -
+
+
+
+
+
+
name: 'Sample Name',
+
+
+
+
+ -
+
+
+
+
+
+
email: 'donor@example.com',
+
+
+
+
+ -
+
+
+
+
+
+
amount: 200.0,
+
+
+
+
+ -
+
+
+
+
+
+
post_id: 2
+
+
+
+
+ -
+
+
+
+
+
+
)
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+ -
+ 1
+
+
+
+
+
mail = WelcomeMailer.donation_confirmation_email(artist, donation)
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+ -
+ 1
+
+
+
+
+
expect(mail.to).to eq([artist.email])
+
+
+
+
+ -
+
+
+
+
+
+
end
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+ -
+ 1
+
+
+
+
+
it 'renders the sender email' do
+
+
+
+
+ -
+ 1
+
+
+
+
+
artist = Artist.create(
+
+
+
+
+ -
+
+
+
+
+
+
name: 'Alice Johnson',
+
+
+
+
+ -
+
+
+
+
+
+
email: 'alice@example.com',
+
+
+
+
+ -
+
+
+
+
+
+
city: 'Sample City',
+
+
+
+
+ -
+
+
+
+
+
+
state: 'Sample State',
+
+
+
+
+ -
+
+
+
+
+
+
zipcode: '12345',
+
+
+
+
+ -
+
+
+
+
+
+
password_digest: 'sample_password_digest',
+
+
+
+
+ -
+
+
+
+
+
+
medium: 'Sample Medium',
+
+
+
+
+ -
+
+
+
+
+
+
profile_image: 'sample_profile_image.jpg'
+
+
+
+
+ -
+
+
+
+
+
+
)
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+ -
+ 1
+
+
+
+
+
donation = Donation.create(
+
+
+
+
+ -
+
+
+
+
+
+
name: 'Sample Name',
+
+
+
+
+ -
+
+
+
+
+
+
email: 'donor@example.com',
+
+
+
+
+ -
+
+
+
+
+
+
amount: 300.0,
+
+
+
+
+ -
+
+
+
+
+
+
post_id: 3
+
+
+
+
+ -
+
+
+
+
+
+
)
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+ -
+ 1
+
+
+
+
+
mail = WelcomeMailer.donation_confirmation_email(artist, donation)
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+ -
+ 1
+
+
+
+
+
expect(mail.from).to eq(["from@example.com"]) # Make an email for our app and add it here
+
+
+
+
+ -
+
+
+
+
+
+
end
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+ -
+ 1
+
+
+
+
+
it 'assigns artist' do
+
+
+
+
+ -
+ 1
+
+
+
+
+
artist = Artist.create(
+
+
+
+
+ -
+
+
+
+
+
+
name: 'Bob Brown',
+
+
+
+
+ -
+
+
+
+
+
+
email: 'bob@example.com',
+
+
+
+
+ -
+
+
+
+
+
+
city: 'Sample City',
+
+
+
+
+ -
+
+
+
+
+
+
state: 'Sample State',
+
+
+
+
+ -
+
+
+
+
+
+
zipcode: '12345',
+
+
+
+
+ -
+
+
+
+
+
+
password_digest: 'sample_password_digest',
+
+
+
+
+ -
+
+
+
+
+
+
medium: 'Sample Medium',
+
+
+
+
+ -
+
+
+
+
+
+
profile_image: 'sample_profile_image.jpg'
+
+
+
+
+ -
+
+
+
+
+
+
)
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+ -
+ 1
+
+
+
+
+
donation = Donation.create(
+
+
+
+
+ -
+
+
+
+
+
+
name: 'Sample Name',
+
+
+
+
+ -
+
+
+
+
+
+
email: 'donor@example.com',
+
+
+
+
+ -
+
+
+
+
+
+
amount: 400.0,
+
+
+
+
+ -
+
+
+
+
+
+
post_id: 4
+
+
+
+
+ -
+
+
+
+
+
+
)
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+ -
+ 1
+
+
+
+
+
mail = WelcomeMailer.donation_confirmation_email(artist, donation)
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+ -
+ 1
+
+
+
+
+
expect(mail.body.encoded).to match(artist.name)
+
+
+
+
+ -
+
+
+
+
+
+
end
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+ -
+ 1
+
+
+
+
+
it 'assigns donation' do
+
+
+
+
+ -
+ 1
+
+
+
+
+
artist = Artist.create(
+
+
+
+
+ -
+
+
+
+
+
+
name: 'Charlie Davis',
+
+
+
+
+ -
+
+
+
+
+
+
email: 'charlie@example.com',
+
+
+
+
+ -
+
+
+
+
+
+
city: 'Sample City',
+
+
+
+
+ -
+
+
+
+
+
+
state: 'Sample State',
+
+
+
+
+ -
+
+
+
+
+
+
zipcode: '12345',
+
+
+
+
+ -
+
+
+
+
+
+
password_digest: 'sample_password_digest',
+
+
+
+
+ -
+
+
+
+
+
+
medium: 'Sample Medium',
+
+
+
+
+ -
+
+
+
+
+
+
profile_image: 'sample_profile_image.jpg'
+
+
+
+
+ -
+
+
+
+
+
+
)
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+ -
+ 1
+
+
+
+
+
donation = Donation.create(
+
+
+
+
+ -
+
+
+
+
+
+
name: 'Sample Name',
+
+
+
+
+ -
+
+
+
+
+
+
email: 'donor@example.com',
+
+
+
+
+ -
+
+
+
+
+
+
amount: 500.0,
+
+
+
+
+ -
+
+
+
+
+
+
post_id: 5
+
+
+
+
+ -
+
+
+
+
+
+
)
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+ -
+ 1
+
+
+
+
+
mail = WelcomeMailer.donation_confirmation_email(artist, donation)
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+ -
+ 1
+
+
+
+
+
expect(mail.body.encoded).to match(donation.amount.to_s)
+
+
+
+
+ -
+ 1
+
+
+
+
+
expect(mail.body.encoded).to match(donation.post_id.to_s)
+
+
+
+
+ -
+
+
+
+
+
+
end
+
+
+
+
+ -
+
+
+
+
+
+
end
+
+
+
+
+ -
+
+
+
+
+
+
end
+
+
+
+
+
+
+
+
+
spec/models/artist_spec.rb
@@ -10154,7 +11604,7 @@
-
+
spec/models/donation_spec.rb
@@ -10328,7 +11778,7 @@
-
+
spec/models/post_spec.rb
@@ -11129,7 +12579,7 @@
-
+
spec/requests/artists/all_artists_spec.rb
@@ -12689,7 +14139,7 @@
-
+
spec/requests/artists/one_artist_spec.rb
@@ -13765,7 +15215,7 @@
-
+
spec/requests/artists_posts/all_artists_with_posts_spec.rb
@@ -15721,7 +17171,7 @@
-
+
spec/requests/artists_posts/mutation_create_posts_spec.rb
@@ -16500,7 +17950,7 @@
-
+
spec/requests/artists_posts/one_artist_with_posts_spec.rb
@@ -18225,7 +19675,7 @@
-
+
spec/requests/artists_posts/update_post_spec.rb
@@ -19587,7 +21037,7 @@
-
+
spec/requests/donations/create_donation_spec.rb
@@ -19618,7 +21068,7 @@
-
+
spec/requests/donations/mutation_create_donation_spec.rb
@@ -20694,7 +22144,7 @@
-
+
spec/requests/donations/update_donation_spec.rb
@@ -21979,7 +23429,7 @@
-
+
spec/workers/welcome_email_worker_spec.rb
diff --git a/schema.graphql b/schema.graphql
new file mode 100644
index 0000000..c4b1d0e
--- /dev/null
+++ b/schema.graphql
@@ -0,0 +1,206 @@
+type Artist {
+ city: String
+ createdAt: ISO8601DateTime!
+ email: String
+ id: ID!
+ medium: String
+ name: String
+ passwordDigest: String
+ posts(orderBy: PostOrderEnum): [Post!]!
+ profileImage: String
+ state: String
+ updatedAt: ISO8601DateTime!
+ zipcode: String
+}
+
+"""
+Autogenerated input type of CreateDonation
+"""
+input CreateDonationInput {
+ amount: Float!
+
+ """
+ A unique identifier for the client performing the mutation.
+ """
+ clientMutationId: String
+ email: String!
+ name: String!
+ postId: Int!
+}
+
+"""
+Autogenerated return type of CreateDonation.
+"""
+type CreateDonationPayload {
+ """
+ A unique identifier for the client performing the mutation.
+ """
+ clientMutationId: String
+ donation: Donation!
+ errors: [String!]!
+}
+
+"""
+Autogenerated input type of CreatePost
+"""
+input CreatePostInput {
+ artistId: Int!
+
+ """
+ A unique identifier for the client performing the mutation.
+ """
+ clientMutationId: String
+ currentAmount: Float!
+ details: String!
+ imageUrl: String!
+ requestedAmount: Float!
+ title: String!
+}
+
+"""
+Autogenerated return type of CreatePost.
+"""
+type CreatePostPayload {
+ """
+ A unique identifier for the client performing the mutation.
+ """
+ clientMutationId: String
+ errors: [String!]!
+ post: Post!
+}
+
+type Donation {
+ amount: Float
+ createdAt: ISO8601DateTime!
+ email: String
+ id: ID!
+ name: String
+ postId: Int!
+ updatedAt: ISO8601DateTime!
+}
+
+"""
+An ISO 8601-encoded datetime
+"""
+scalar ISO8601DateTime @specifiedBy(url: "https://tools.ietf.org/html/rfc3339")
+
+type Mutation {
+ createDonation(
+ """
+ Parameters for CreateDonation
+ """
+ input: CreateDonationInput!
+ ): CreateDonationPayload
+ createPost(
+ """
+ Parameters for CreatePost
+ """
+ input: CreatePostInput!
+ ): CreatePostPayload
+ updateDonation(
+ """
+ Parameters for UpdateDonation
+ """
+ input: UpdateDonationInput!
+ ): UpdateDonationPayload
+ updatePost(
+ """
+ Parameters for UpdatePost
+ """
+ input: UpdatePostInput!
+ ): UpdatePostPayload
+}
+
+type Post {
+ artistId: Int!
+ createdAt: ISO8601DateTime!
+ currentAmount: Float
+ details: String
+ donationPercentage: Float!
+ donations: [Donation!]!
+ id: ID!
+ imageUrl: String
+ requestedAmount: Float
+ title: String
+ updatedAt: ISO8601DateTime!
+}
+
+enum PostOrderEnum {
+ """
+ Sort by ascending order
+ """
+ ASC
+
+ """
+ Sort by descending order
+ """
+ DESC
+}
+
+type Query {
+ artist(id: ID!): Artist!
+ artists: [Artist!]!
+
+ """
+ Get a list of posts with optional sorting
+ """
+ posts(orderBy: PostOrderEnum): [Post!]!
+}
+
+"""
+Autogenerated input type of UpdateDonation
+"""
+input UpdateDonationInput {
+ amount: Float!
+
+ """
+ A unique identifier for the client performing the mutation.
+ """
+ clientMutationId: String
+ email: String!
+ id: ID!
+ name: String!
+ postId: Int!
+}
+
+"""
+Autogenerated return type of UpdateDonation.
+"""
+type UpdateDonationPayload {
+ """
+ A unique identifier for the client performing the mutation.
+ """
+ clientMutationId: String
+ donation: Donation
+ errors: [String!]!
+}
+
+"""
+Autogenerated input type of UpdatePost
+"""
+input UpdatePostInput {
+ artistId: Int!
+
+ """
+ A unique identifier for the client performing the mutation.
+ """
+ clientMutationId: String
+ currentAmount: Float!
+ details: String!
+ id: ID!
+ imageUrl: String!
+ requestedAmount: Float!
+ title: String!
+}
+
+"""
+Autogenerated return type of UpdatePost.
+"""
+type UpdatePostPayload {
+ """
+ A unique identifier for the client performing the mutation.
+ """
+ clientMutationId: String
+ errors: [String!]!
+ post: Post
+}
diff --git a/schema.json b/schema.json
new file mode 100644
index 0000000..7cd7447
--- /dev/null
+++ b/schema.json
@@ -0,0 +1,2764 @@
+{
+ "data": {
+ "__schema": {
+ "queryType": {
+ "name": "Query"
+ },
+ "mutationType": {
+ "name": "Mutation"
+ },
+ "subscriptionType": null,
+ "types": [
+ {
+ "kind": "OBJECT",
+ "name": "Artist",
+ "description": null,
+ "interfaces": [
+
+ ],
+ "possibleTypes": null,
+ "fields": [
+ {
+ "name": "city",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "createdAt",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "ISO8601DateTime",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "email",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "id",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "ID",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "medium",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "name",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "passwordDigest",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "posts",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "OBJECT",
+ "name": "Post",
+ "ofType": null
+ }
+ }
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+ {
+ "name": "orderBy",
+ "description": null,
+ "type": {
+ "kind": "ENUM",
+ "name": "PostOrderEnum",
+ "ofType": null
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ]
+ },
+ {
+ "name": "profileImage",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "state",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "updatedAt",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "ISO8601DateTime",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "zipcode",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ }
+ ],
+ "inputFields": null,
+ "enumValues": null
+ },
+ {
+ "kind": "SCALAR",
+ "name": "Boolean",
+ "description": "Represents `true` or `false` values.",
+ "interfaces": null,
+ "possibleTypes": null,
+ "fields": null,
+ "inputFields": null,
+ "enumValues": null
+ },
+ {
+ "kind": "INPUT_OBJECT",
+ "name": "CreateDonationInput",
+ "description": "Autogenerated input type of CreateDonation",
+ "interfaces": null,
+ "possibleTypes": null,
+ "fields": null,
+ "inputFields": [
+ {
+ "name": "clientMutationId",
+ "description": "A unique identifier for the client performing the mutation.",
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "amount",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Float",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "postId",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Int",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "name",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "email",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ],
+ "enumValues": null
+ },
+ {
+ "kind": "OBJECT",
+ "name": "CreateDonationPayload",
+ "description": "Autogenerated return type of CreateDonation.",
+ "interfaces": [
+
+ ],
+ "possibleTypes": null,
+ "fields": [
+ {
+ "name": "clientMutationId",
+ "description": "A unique identifier for the client performing the mutation.",
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "donation",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "OBJECT",
+ "name": "Donation",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "errors",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ }
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ }
+ ],
+ "inputFields": null,
+ "enumValues": null
+ },
+ {
+ "kind": "INPUT_OBJECT",
+ "name": "CreatePostInput",
+ "description": "Autogenerated input type of CreatePost",
+ "interfaces": null,
+ "possibleTypes": null,
+ "fields": null,
+ "inputFields": [
+ {
+ "name": "clientMutationId",
+ "description": "A unique identifier for the client performing the mutation.",
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "title",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "details",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "imageUrl",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "requestedAmount",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Float",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "currentAmount",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Float",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "artistId",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Int",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ],
+ "enumValues": null
+ },
+ {
+ "kind": "OBJECT",
+ "name": "CreatePostPayload",
+ "description": "Autogenerated return type of CreatePost.",
+ "interfaces": [
+
+ ],
+ "possibleTypes": null,
+ "fields": [
+ {
+ "name": "clientMutationId",
+ "description": "A unique identifier for the client performing the mutation.",
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "errors",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ }
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "post",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "OBJECT",
+ "name": "Post",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ }
+ ],
+ "inputFields": null,
+ "enumValues": null
+ },
+ {
+ "kind": "OBJECT",
+ "name": "Donation",
+ "description": null,
+ "interfaces": [
+
+ ],
+ "possibleTypes": null,
+ "fields": [
+ {
+ "name": "amount",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "Float",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "createdAt",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "ISO8601DateTime",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "email",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "id",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "ID",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "name",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "postId",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Int",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "updatedAt",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "ISO8601DateTime",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ }
+ ],
+ "inputFields": null,
+ "enumValues": null
+ },
+ {
+ "kind": "SCALAR",
+ "name": "Float",
+ "description": "Represents signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point).",
+ "interfaces": null,
+ "possibleTypes": null,
+ "fields": null,
+ "inputFields": null,
+ "enumValues": null
+ },
+ {
+ "kind": "SCALAR",
+ "name": "ID",
+ "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
+ "interfaces": null,
+ "possibleTypes": null,
+ "fields": null,
+ "inputFields": null,
+ "enumValues": null
+ },
+ {
+ "kind": "SCALAR",
+ "name": "ISO8601DateTime",
+ "description": "An ISO 8601-encoded datetime",
+ "interfaces": null,
+ "possibleTypes": null,
+ "fields": null,
+ "inputFields": null,
+ "enumValues": null
+ },
+ {
+ "kind": "SCALAR",
+ "name": "Int",
+ "description": "Represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.",
+ "interfaces": null,
+ "possibleTypes": null,
+ "fields": null,
+ "inputFields": null,
+ "enumValues": null
+ },
+ {
+ "kind": "OBJECT",
+ "name": "Mutation",
+ "description": null,
+ "interfaces": [
+
+ ],
+ "possibleTypes": null,
+ "fields": [
+ {
+ "name": "createDonation",
+ "description": null,
+ "type": {
+ "kind": "OBJECT",
+ "name": "CreateDonationPayload",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+ {
+ "name": "input",
+ "description": "Parameters for CreateDonation",
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "INPUT_OBJECT",
+ "name": "CreateDonationInput",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ]
+ },
+ {
+ "name": "createPost",
+ "description": null,
+ "type": {
+ "kind": "OBJECT",
+ "name": "CreatePostPayload",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+ {
+ "name": "input",
+ "description": "Parameters for CreatePost",
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "INPUT_OBJECT",
+ "name": "CreatePostInput",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ]
+ },
+ {
+ "name": "updateDonation",
+ "description": null,
+ "type": {
+ "kind": "OBJECT",
+ "name": "UpdateDonationPayload",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+ {
+ "name": "input",
+ "description": "Parameters for UpdateDonation",
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "INPUT_OBJECT",
+ "name": "UpdateDonationInput",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ]
+ },
+ {
+ "name": "updatePost",
+ "description": null,
+ "type": {
+ "kind": "OBJECT",
+ "name": "UpdatePostPayload",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+ {
+ "name": "input",
+ "description": "Parameters for UpdatePost",
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "INPUT_OBJECT",
+ "name": "UpdatePostInput",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ]
+ }
+ ],
+ "inputFields": null,
+ "enumValues": null
+ },
+ {
+ "kind": "OBJECT",
+ "name": "Post",
+ "description": null,
+ "interfaces": [
+
+ ],
+ "possibleTypes": null,
+ "fields": [
+ {
+ "name": "artistId",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Int",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "createdAt",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "ISO8601DateTime",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "currentAmount",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "Float",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "details",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "donationPercentage",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Float",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "donations",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "OBJECT",
+ "name": "Donation",
+ "ofType": null
+ }
+ }
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "id",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "ID",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "imageUrl",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "requestedAmount",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "Float",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "title",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "updatedAt",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "ISO8601DateTime",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ }
+ ],
+ "inputFields": null,
+ "enumValues": null
+ },
+ {
+ "kind": "ENUM",
+ "name": "PostOrderEnum",
+ "description": null,
+ "interfaces": null,
+ "possibleTypes": null,
+ "fields": null,
+ "inputFields": null,
+ "enumValues": [
+ {
+ "name": "ASC",
+ "description": "Sort by ascending order",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "DESC",
+ "description": "Sort by descending order",
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ]
+ },
+ {
+ "kind": "OBJECT",
+ "name": "Query",
+ "description": null,
+ "interfaces": [
+
+ ],
+ "possibleTypes": null,
+ "fields": [
+ {
+ "name": "artist",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "OBJECT",
+ "name": "Artist",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+ {
+ "name": "id",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "ID",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ]
+ },
+ {
+ "name": "artists",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "OBJECT",
+ "name": "Artist",
+ "ofType": null
+ }
+ }
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "posts",
+ "description": "Get a list of posts with optional sorting",
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "OBJECT",
+ "name": "Post",
+ "ofType": null
+ }
+ }
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+ {
+ "name": "orderBy",
+ "description": null,
+ "type": {
+ "kind": "ENUM",
+ "name": "PostOrderEnum",
+ "ofType": null
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ]
+ }
+ ],
+ "inputFields": null,
+ "enumValues": null
+ },
+ {
+ "kind": "SCALAR",
+ "name": "String",
+ "description": "Represents textual data as UTF-8 character sequences. This type is most often used by GraphQL to represent free-form human-readable text.",
+ "interfaces": null,
+ "possibleTypes": null,
+ "fields": null,
+ "inputFields": null,
+ "enumValues": null
+ },
+ {
+ "kind": "INPUT_OBJECT",
+ "name": "UpdateDonationInput",
+ "description": "Autogenerated input type of UpdateDonation",
+ "interfaces": null,
+ "possibleTypes": null,
+ "fields": null,
+ "inputFields": [
+ {
+ "name": "clientMutationId",
+ "description": "A unique identifier for the client performing the mutation.",
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "id",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "ID",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "name",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "email",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "amount",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Float",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "postId",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Int",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ],
+ "enumValues": null
+ },
+ {
+ "kind": "OBJECT",
+ "name": "UpdateDonationPayload",
+ "description": "Autogenerated return type of UpdateDonation.",
+ "interfaces": [
+
+ ],
+ "possibleTypes": null,
+ "fields": [
+ {
+ "name": "clientMutationId",
+ "description": "A unique identifier for the client performing the mutation.",
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "donation",
+ "description": null,
+ "type": {
+ "kind": "OBJECT",
+ "name": "Donation",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "errors",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ }
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ }
+ ],
+ "inputFields": null,
+ "enumValues": null
+ },
+ {
+ "kind": "INPUT_OBJECT",
+ "name": "UpdatePostInput",
+ "description": "Autogenerated input type of UpdatePost",
+ "interfaces": null,
+ "possibleTypes": null,
+ "fields": null,
+ "inputFields": [
+ {
+ "name": "clientMutationId",
+ "description": "A unique identifier for the client performing the mutation.",
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "id",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "ID",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "title",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "details",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "imageUrl",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "requestedAmount",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Float",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "currentAmount",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Float",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "artistId",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Int",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ],
+ "enumValues": null
+ },
+ {
+ "kind": "OBJECT",
+ "name": "UpdatePostPayload",
+ "description": "Autogenerated return type of UpdatePost.",
+ "interfaces": [
+
+ ],
+ "possibleTypes": null,
+ "fields": [
+ {
+ "name": "clientMutationId",
+ "description": "A unique identifier for the client performing the mutation.",
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "errors",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ }
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "post",
+ "description": null,
+ "type": {
+ "kind": "OBJECT",
+ "name": "Post",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ }
+ ],
+ "inputFields": null,
+ "enumValues": null
+ },
+ {
+ "kind": "OBJECT",
+ "name": "__Directive",
+ "description": "A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.\n\nIn some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.",
+ "interfaces": [
+
+ ],
+ "possibleTypes": null,
+ "fields": [
+ {
+ "name": "args",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "OBJECT",
+ "name": "__InputValue",
+ "ofType": null
+ }
+ }
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+ {
+ "name": "includeDeprecated",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "Boolean",
+ "ofType": null
+ },
+ "defaultValue": "false",
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ]
+ },
+ {
+ "name": "description",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "isRepeatable",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "Boolean",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "locations",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "ENUM",
+ "name": "__DirectiveLocation",
+ "ofType": null
+ }
+ }
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "name",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "onField",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Boolean",
+ "ofType": null
+ }
+ },
+ "isDeprecated": true,
+ "deprecationReason": "Use `locations`.",
+ "args": [
+
+ ]
+ },
+ {
+ "name": "onFragment",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Boolean",
+ "ofType": null
+ }
+ },
+ "isDeprecated": true,
+ "deprecationReason": "Use `locations`.",
+ "args": [
+
+ ]
+ },
+ {
+ "name": "onOperation",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Boolean",
+ "ofType": null
+ }
+ },
+ "isDeprecated": true,
+ "deprecationReason": "Use `locations`.",
+ "args": [
+
+ ]
+ }
+ ],
+ "inputFields": null,
+ "enumValues": null
+ },
+ {
+ "kind": "ENUM",
+ "name": "__DirectiveLocation",
+ "description": "A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.",
+ "interfaces": null,
+ "possibleTypes": null,
+ "fields": null,
+ "inputFields": null,
+ "enumValues": [
+ {
+ "name": "QUERY",
+ "description": "Location adjacent to a query operation.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "MUTATION",
+ "description": "Location adjacent to a mutation operation.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "SUBSCRIPTION",
+ "description": "Location adjacent to a subscription operation.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "FIELD",
+ "description": "Location adjacent to a field.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "FRAGMENT_DEFINITION",
+ "description": "Location adjacent to a fragment definition.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "FRAGMENT_SPREAD",
+ "description": "Location adjacent to a fragment spread.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "INLINE_FRAGMENT",
+ "description": "Location adjacent to an inline fragment.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "SCHEMA",
+ "description": "Location adjacent to a schema definition.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "SCALAR",
+ "description": "Location adjacent to a scalar definition.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "OBJECT",
+ "description": "Location adjacent to an object type definition.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "FIELD_DEFINITION",
+ "description": "Location adjacent to a field definition.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "ARGUMENT_DEFINITION",
+ "description": "Location adjacent to an argument definition.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "INTERFACE",
+ "description": "Location adjacent to an interface definition.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "UNION",
+ "description": "Location adjacent to a union definition.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "ENUM",
+ "description": "Location adjacent to an enum definition.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "ENUM_VALUE",
+ "description": "Location adjacent to an enum value definition.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "INPUT_OBJECT",
+ "description": "Location adjacent to an input object type definition.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "INPUT_FIELD_DEFINITION",
+ "description": "Location adjacent to an input object field definition.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "VARIABLE_DEFINITION",
+ "description": "Location adjacent to a variable definition.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ]
+ },
+ {
+ "kind": "OBJECT",
+ "name": "__EnumValue",
+ "description": "One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.",
+ "interfaces": [
+
+ ],
+ "possibleTypes": null,
+ "fields": [
+ {
+ "name": "deprecationReason",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "description",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "isDeprecated",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Boolean",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "name",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ }
+ ],
+ "inputFields": null,
+ "enumValues": null
+ },
+ {
+ "kind": "OBJECT",
+ "name": "__Field",
+ "description": "Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.",
+ "interfaces": [
+
+ ],
+ "possibleTypes": null,
+ "fields": [
+ {
+ "name": "args",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "OBJECT",
+ "name": "__InputValue",
+ "ofType": null
+ }
+ }
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+ {
+ "name": "includeDeprecated",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "Boolean",
+ "ofType": null
+ },
+ "defaultValue": "false",
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ]
+ },
+ {
+ "name": "deprecationReason",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "description",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "isDeprecated",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Boolean",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "name",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "type",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "OBJECT",
+ "name": "__Type",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ }
+ ],
+ "inputFields": null,
+ "enumValues": null
+ },
+ {
+ "kind": "OBJECT",
+ "name": "__InputValue",
+ "description": "Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.",
+ "interfaces": [
+
+ ],
+ "possibleTypes": null,
+ "fields": [
+ {
+ "name": "defaultValue",
+ "description": "A GraphQL-formatted string representing the default value for this input value.",
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "deprecationReason",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "description",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "isDeprecated",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Boolean",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "name",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "type",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "OBJECT",
+ "name": "__Type",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ }
+ ],
+ "inputFields": null,
+ "enumValues": null
+ },
+ {
+ "kind": "OBJECT",
+ "name": "__Schema",
+ "description": "A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.",
+ "interfaces": [
+
+ ],
+ "possibleTypes": null,
+ "fields": [
+ {
+ "name": "description",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "directives",
+ "description": "A list of all directives supported by this server.",
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "OBJECT",
+ "name": "__Directive",
+ "ofType": null
+ }
+ }
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "mutationType",
+ "description": "If this server supports mutation, the type that mutation operations will be rooted at.",
+ "type": {
+ "kind": "OBJECT",
+ "name": "__Type",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "queryType",
+ "description": "The type that query operations will be rooted at.",
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "OBJECT",
+ "name": "__Type",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "subscriptionType",
+ "description": "If this server support subscription, the type that subscription operations will be rooted at.",
+ "type": {
+ "kind": "OBJECT",
+ "name": "__Type",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "types",
+ "description": "A list of all types supported by this server.",
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "OBJECT",
+ "name": "__Type",
+ "ofType": null
+ }
+ }
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ }
+ ],
+ "inputFields": null,
+ "enumValues": null
+ },
+ {
+ "kind": "OBJECT",
+ "name": "__Type",
+ "description": "The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name and description, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.",
+ "interfaces": [
+
+ ],
+ "possibleTypes": null,
+ "fields": [
+ {
+ "name": "description",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "enumValues",
+ "description": null,
+ "type": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "OBJECT",
+ "name": "__EnumValue",
+ "ofType": null
+ }
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+ {
+ "name": "includeDeprecated",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "Boolean",
+ "ofType": null
+ },
+ "defaultValue": "false",
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ]
+ },
+ {
+ "name": "fields",
+ "description": null,
+ "type": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "OBJECT",
+ "name": "__Field",
+ "ofType": null
+ }
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+ {
+ "name": "includeDeprecated",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "Boolean",
+ "ofType": null
+ },
+ "defaultValue": "false",
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ]
+ },
+ {
+ "name": "inputFields",
+ "description": null,
+ "type": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "OBJECT",
+ "name": "__InputValue",
+ "ofType": null
+ }
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+ {
+ "name": "includeDeprecated",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "Boolean",
+ "ofType": null
+ },
+ "defaultValue": "false",
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ]
+ },
+ {
+ "name": "interfaces",
+ "description": null,
+ "type": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "OBJECT",
+ "name": "__Type",
+ "ofType": null
+ }
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "isOneOf",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Boolean",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "kind",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "ENUM",
+ "name": "__TypeKind",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "name",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "ofType",
+ "description": null,
+ "type": {
+ "kind": "OBJECT",
+ "name": "__Type",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "possibleTypes",
+ "description": null,
+ "type": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "OBJECT",
+ "name": "__Type",
+ "ofType": null
+ }
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "specifiedByURL",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ }
+ ],
+ "inputFields": null,
+ "enumValues": null
+ },
+ {
+ "kind": "ENUM",
+ "name": "__TypeKind",
+ "description": "An enum describing what kind of type a given `__Type` is.",
+ "interfaces": null,
+ "possibleTypes": null,
+ "fields": null,
+ "inputFields": null,
+ "enumValues": [
+ {
+ "name": "SCALAR",
+ "description": "Indicates this type is a scalar.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "OBJECT",
+ "description": "Indicates this type is an object. `fields` and `interfaces` are valid fields.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "INTERFACE",
+ "description": "Indicates this type is an interface. `fields` and `possibleTypes` are valid fields.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "UNION",
+ "description": "Indicates this type is a union. `possibleTypes` is a valid field.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "ENUM",
+ "description": "Indicates this type is an enum. `enumValues` is a valid field.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "INPUT_OBJECT",
+ "description": "Indicates this type is an input object. `inputFields` is a valid field.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "LIST",
+ "description": "Indicates this type is a list. `ofType` is a valid field.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "NON_NULL",
+ "description": "Indicates this type is a non-null. `ofType` is a valid field.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ]
+ }
+ ],
+ "directives": [
+ {
+ "name": "include",
+ "description": "Directs the executor to include this field or fragment only when the `if` argument is true.",
+ "locations": [
+ "FIELD",
+ "FRAGMENT_SPREAD",
+ "INLINE_FRAGMENT"
+ ],
+ "args": [
+ {
+ "name": "if",
+ "description": "Included when true.",
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Boolean",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ]
+ },
+ {
+ "name": "skip",
+ "description": "Directs the executor to skip this field or fragment when the `if` argument is true.",
+ "locations": [
+ "FIELD",
+ "FRAGMENT_SPREAD",
+ "INLINE_FRAGMENT"
+ ],
+ "args": [
+ {
+ "name": "if",
+ "description": "Skipped when true.",
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Boolean",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ]
+ },
+ {
+ "name": "deprecated",
+ "description": "Marks an element of a GraphQL schema as no longer supported.",
+ "locations": [
+ "FIELD_DEFINITION",
+ "ENUM_VALUE",
+ "ARGUMENT_DEFINITION",
+ "INPUT_FIELD_DEFINITION"
+ ],
+ "args": [
+ {
+ "name": "reason",
+ "description": "Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted in [Markdown](https://daringfireball.net/projects/markdown/).",
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "defaultValue": "\"No longer supported\"",
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ]
+ },
+ {
+ "name": "oneOf",
+ "description": "Requires that exactly one field must be supplied and that field must not be `null`.",
+ "locations": [
+ "INPUT_OBJECT"
+ ],
+ "args": [
+
+ ]
+ },
+ {
+ "name": "specifiedBy",
+ "description": "Exposes a URL that specifies the behavior of this scalar.",
+ "locations": [
+ "SCALAR"
+ ],
+ "args": [
+ {
+ "name": "url",
+ "description": "The URL that specifies the behavior of this scalar.",
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ]
+ }
+ ]
+ }
+ }
+}
diff --git a/spec/graphql/app_schema_spec.rb b/spec/graphql/app_schema_spec.rb
new file mode 100644
index 0000000..6210d63
--- /dev/null
+++ b/spec/graphql/app_schema_spec.rb
@@ -0,0 +1,12 @@
+require 'rails_helper'
+
+RSpec.describe GearUpBeSchema, type: :graphql do
+ it 'matches the dumped schema (rails graphql:schema:dump)' do
+ aggregate_failures do
+ expected = described_class.to_definition.gsub(/\s+/, ' ')
+ actual = File.read(Rails.root.join('schema.graphql')).gsub(/\s+/, ' ')
+
+ expect(expected).to eq(actual)
+ end
+ end
+end
diff --git a/spec/support/graphql_helpers.rb b/spec/support/graphql_helpers.rb
new file mode 100644
index 0000000..41b0a24
--- /dev/null
+++ b/spec/support/graphql_helpers.rb
@@ -0,0 +1,14 @@
+module GraphQLHelpers
+ def controller
+ @controller ||= GraphqlController.new.tap do |obj|
+ obj.set_request! ActionDispatch::Request.new({})
+ end
+ end
+
+ def execute_graphql(query, **kwargs)
+ GearUpBeSchema.execute(
+ query,
+ { context: { controller: controller } }.merge(kwargs),
+ )
+ end
+end
-
+
app/controllers/application_controller.rb
@@ -745,7 +756,7 @@
-
+
app/controllers/graphql_controller.rb
@@ -1370,7 +1381,7 @@
-
+
app/graphql/gear_up_be_schema.rb
@@ -1863,7 +1874,7 @@
-
+
app/graphql/mutations/base_mutation.rb
@@ -2004,7 +2015,7 @@
-
+
app/graphql/mutations/create_donation.rb
@@ -2398,7 +2409,7 @@
-
+
app/graphql/mutations/create_post.rb
@@ -2902,7 +2913,7 @@
-
+
app/graphql/mutations/update_donation.rb
@@ -3296,7 +3307,7 @@
-
+
app/graphql/mutations/update_post.rb
@@ -3734,7 +3745,7 @@
-
+
app/graphql/types/artist_type.rb
@@ -4128,7 +4139,7 @@
-
+
app/graphql/types/base_argument.rb
@@ -4225,7 +4236,7 @@
-
+
app/graphql/types/base_connection.rb
@@ -4344,7 +4355,7 @@
-
+
app/graphql/types/base_edge.rb
@@ -4463,7 +4474,7 @@
-
+
app/graphql/types/base_field.rb
@@ -4571,7 +4582,7 @@
-
+
app/graphql/types/base_input_object.rb
@@ -4679,7 +4690,7 @@
-
+
app/graphql/types/base_interface.rb
@@ -4831,7 +4842,7 @@
-
+
app/graphql/types/base_object.rb
@@ -4961,7 +4972,7 @@
-
+
app/graphql/types/donation_type.rb
@@ -5135,7 +5146,7 @@
-
+
app/graphql/types/mutation_type.rb
@@ -5276,7 +5287,7 @@
-
+
app/graphql/types/node_type.rb
@@ -5406,7 +5417,7 @@
-
+
app/graphql/types/post_order_enum.rb
@@ -5503,7 +5514,7 @@
-
+
app/graphql/types/post_type.rb
@@ -5820,7 +5831,7 @@
-
+
app/graphql/types/query_type.rb
@@ -6423,7 +6434,7 @@
-
+
app/helpers/application_helper.rb
@@ -6476,7 +6487,7 @@
-
+
app/mailers/application_mailer.rb
@@ -6551,7 +6562,7 @@
-
+
app/mailers/welcome_mailer.rb
@@ -6681,7 +6692,7 @@
-
+
app/models/application_record.rb
@@ -6745,7 +6756,7 @@
-
+
app/models/artist.rb
@@ -6853,7 +6864,7 @@
-
+
app/models/donation.rb
@@ -6928,7 +6939,7 @@
-
+
app/models/post.rb
@@ -7190,7 +7201,7 @@
-
+
app/workers/welcome_email_worker.rb
@@ -7320,7 +7331,7 @@
-
+
config/application.rb
@@ -7758,7 +7769,7 @@
-
+
config/boot.rb
@@ -7833,7 +7844,7 @@
-
+
config/environment.rb
@@ -7919,7 +7930,7 @@
-
+
config/environments/test.rb
@@ -8610,7 +8621,7 @@
-
+
config/initializers/assets.rb
@@ -8773,7 +8784,7 @@
-
+
config/initializers/content_security_policy.rb
@@ -9079,7 +9090,7 @@
-
+
config/initializers/cors.rb
@@ -9209,7 +9220,7 @@
-
+
config/initializers/filter_parameter_logging.rb
@@ -9328,7 +9339,7 @@
-
+
config/initializers/inflections.rb
@@ -9535,7 +9546,7 @@
-
+
config/initializers/permissions_policy.rb
@@ -9687,7 +9698,7 @@
-
+
config/initializers/sidekiq.rb
@@ -9795,7 +9806,7 @@
-
+
config/routes.rb
@@ -9947,7 +9958,1446 @@
-
+
+
+ spec/mailers/welcome_mailer_spec.rb
+
+
+ 100.0%
+
+
+ lines covered
+
+
+
+
+
+ 29 relevant lines.
+ 29 lines covered and
+ 0 lines missed.
+
+
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
# spec/mailers/welcome_mailer_spec.rb
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+ -
+ 1
+
+
+
+
+
require 'rails_helper'
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+ -
+ 1
+
+
+
+
+
RSpec.describe WelcomeMailer, type: :mailer do
+
+
+
+
+ -
+ 1
+
+
+
+
+
describe 'donation_confirmation_email' do
+
+
+
+
+ -
+ 1
+
+
+
+
+
it 'renders the subject' do
+
+
+
+
+ -
+ 1
+
+
+
+
+
artist = Artist.create(
+
+
+
+
+ -
+
+
+
+
+
+
name: 'John Doe',
+
+
+
+
+ -
+
+
+
+
+
+
email: 'john@example.com',
+
+
+
+
+ -
+
+
+
+
+
+
city: 'Sample City',
+
+
+
+
+ -
+
+
+
+
+
+
state: 'Sample State',
+
+
+
+
+ -
+
+
+
+
+
+
zipcode: '12345',
+
+
+
+
+ -
+
+
+
+
+
+
password_digest: 'sample_password_digest',
+
+
+
+
+ -
+
+
+
+
+
+
medium: 'Sample Medium',
+
+
+
+
+ -
+
+
+
+
+
+
profile_image: 'sample_profile_image.jpg'
+
+
+
+
+ -
+
+
+
+
+
+
)
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+ -
+ 1
+
+
+
+
+
donation = Donation.create(
+
+
+
+
+ -
+
+
+
+
+
+
name: 'Sample Name',
+
+
+
+
+ -
+
+
+
+
+
+
email: 'donor@example.com',
+
+
+
+
+ -
+
+
+
+
+
+
amount: 100.0,
+
+
+
+
+ -
+
+
+
+
+
+
post_id: 1
+
+
+
+
+ -
+
+
+
+
+
+
)
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+ -
+ 1
+
+
+
+
+
mail = WelcomeMailer.donation_confirmation_email(artist, donation)
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+ -
+ 1
+
+
+
+
+
expect(mail.subject).to eq('Donation Confirmation')
+
+
+
+
+ -
+
+
+
+
+
+
end
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+ -
+ 1
+
+
+
+
+
it 'renders the receiver email' do
+
+
+
+
+ -
+ 1
+
+
+
+
+
artist = Artist.create(
+
+
+
+
+ -
+
+
+
+
+
+
name: 'Jane Smith',
+
+
+
+
+ -
+
+
+
+
+
+
email: 'jane@example.com',
+
+
+
+
+ -
+
+
+
+
+
+
city: 'Sample City',
+
+
+
+
+ -
+
+
+
+
+
+
state: 'Sample State',
+
+
+
+
+ -
+
+
+
+
+
+
zipcode: '12345',
+
+
+
+
+ -
+
+
+
+
+
+
password_digest: 'sample_password_digest',
+
+
+
+
+ -
+
+
+
+
+
+
medium: 'Sample Medium',
+
+
+
+
+ -
+
+
+
+
+
+
profile_image: 'sample_profile_image.jpg'
+
+
+
+
+ -
+
+
+
+
+
+
)
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+ -
+ 1
+
+
+
+
+
donation = Donation.create(
+
+
+
+
+ -
+
+
+
+
+
+
name: 'Sample Name',
+
+
+
+
+ -
+
+
+
+
+
+
email: 'donor@example.com',
+
+
+
+
+ -
+
+
+
+
+
+
amount: 200.0,
+
+
+
+
+ -
+
+
+
+
+
+
post_id: 2
+
+
+
+
+ -
+
+
+
+
+
+
)
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+ -
+ 1
+
+
+
+
+
mail = WelcomeMailer.donation_confirmation_email(artist, donation)
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+ -
+ 1
+
+
+
+
+
expect(mail.to).to eq([artist.email])
+
+
+
+
+ -
+
+
+
+
+
+
end
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+ -
+ 1
+
+
+
+
+
it 'renders the sender email' do
+
+
+
+
+ -
+ 1
+
+
+
+
+
artist = Artist.create(
+
+
+
+
+ -
+
+
+
+
+
+
name: 'Alice Johnson',
+
+
+
+
+ -
+
+
+
+
+
+
email: 'alice@example.com',
+
+
+
+
+ -
+
+
+
+
+
+
city: 'Sample City',
+
+
+
+
+ -
+
+
+
+
+
+
state: 'Sample State',
+
+
+
+
+ -
+
+
+
+
+
+
zipcode: '12345',
+
+
+
+
+ -
+
+
+
+
+
+
password_digest: 'sample_password_digest',
+
+
+
+
+ -
+
+
+
+
+
+
medium: 'Sample Medium',
+
+
+
+
+ -
+
+
+
+
+
+
profile_image: 'sample_profile_image.jpg'
+
+
+
+
+ -
+
+
+
+
+
+
)
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+ -
+ 1
+
+
+
+
+
donation = Donation.create(
+
+
+
+
+ -
+
+
+
+
+
+
name: 'Sample Name',
+
+
+
+
+ -
+
+
+
+
+
+
email: 'donor@example.com',
+
+
+
+
+ -
+
+
+
+
+
+
amount: 300.0,
+
+
+
+
+ -
+
+
+
+
+
+
post_id: 3
+
+
+
+
+ -
+
+
+
+
+
+
)
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+ -
+ 1
+
+
+
+
+
mail = WelcomeMailer.donation_confirmation_email(artist, donation)
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+ -
+ 1
+
+
+
+
+
expect(mail.from).to eq(["from@example.com"]) # Make an email for our app and add it here
+
+
+
+
+ -
+
+
+
+
+
+
end
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+ -
+ 1
+
+
+
+
+
it 'assigns artist' do
+
+
+
+
+ -
+ 1
+
+
+
+
+
artist = Artist.create(
+
+
+
+
+ -
+
+
+
+
+
+
name: 'Bob Brown',
+
+
+
+
+ -
+
+
+
+
+
+
email: 'bob@example.com',
+
+
+
+
+ -
+
+
+
+
+
+
city: 'Sample City',
+
+
+
+
+ -
+
+
+
+
+
+
state: 'Sample State',
+
+
+
+
+ -
+
+
+
+
+
+
zipcode: '12345',
+
+
+
+
+ -
+
+
+
+
+
+
password_digest: 'sample_password_digest',
+
+
+
+
+ -
+
+
+
+
+
+
medium: 'Sample Medium',
+
+
+
+
+ -
+
+
+
+
+
+
profile_image: 'sample_profile_image.jpg'
+
+
+
+
+ -
+
+
+
+
+
+
)
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+ -
+ 1
+
+
+
+
+
donation = Donation.create(
+
+
+
+
+ -
+
+
+
+
+
+
name: 'Sample Name',
+
+
+
+
+ -
+
+
+
+
+
+
email: 'donor@example.com',
+
+
+
+
+ -
+
+
+
+
+
+
amount: 400.0,
+
+
+
+
+ -
+
+
+
+
+
+
post_id: 4
+
+
+
+
+ -
+
+
+
+
+
+
)
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+ -
+ 1
+
+
+
+
+
mail = WelcomeMailer.donation_confirmation_email(artist, donation)
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+ -
+ 1
+
+
+
+
+
expect(mail.body.encoded).to match(artist.name)
+
+
+
+
+ -
+
+
+
+
+
+
end
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+ -
+ 1
+
+
+
+
+
it 'assigns donation' do
+
+
+
+
+ -
+ 1
+
+
+
+
+
artist = Artist.create(
+
+
+
+
+ -
+
+
+
+
+
+
name: 'Charlie Davis',
+
+
+
+
+ -
+
+
+
+
+
+
email: 'charlie@example.com',
+
+
+
+
+ -
+
+
+
+
+
+
city: 'Sample City',
+
+
+
+
+ -
+
+
+
+
+
+
state: 'Sample State',
+
+
+
+
+ -
+
+
+
+
+
+
zipcode: '12345',
+
+
+
+
+ -
+
+
+
+
+
+
password_digest: 'sample_password_digest',
+
+
+
+
+ -
+
+
+
+
+
+
medium: 'Sample Medium',
+
+
+
+
+ -
+
+
+
+
+
+
profile_image: 'sample_profile_image.jpg'
+
+
+
+
+ -
+
+
+
+
+
+
)
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+ -
+ 1
+
+
+
+
+
donation = Donation.create(
+
+
+
+
+ -
+
+
+
+
+
+
name: 'Sample Name',
+
+
+
+
+ -
+
+
+
+
+
+
email: 'donor@example.com',
+
+
+
+
+ -
+
+
+
+
+
+
amount: 500.0,
+
+
+
+
+ -
+
+
+
+
+
+
post_id: 5
+
+
+
+
+ -
+
+
+
+
+
+
)
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+ -
+ 1
+
+
+
+
+
mail = WelcomeMailer.donation_confirmation_email(artist, donation)
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+ -
+ 1
+
+
+
+
+
expect(mail.body.encoded).to match(donation.amount.to_s)
+
+
+
+
+ -
+ 1
+
+
+
+
+
expect(mail.body.encoded).to match(donation.post_id.to_s)
+
+
+
+
+ -
+
+
+
+
+
+
end
+
+
+
+
+ -
+
+
+
+
+
+
end
+
+
+
+
+ -
+
+
+
+
+
+
end
+
+
+
+
+
+
+
+
+
spec/models/artist_spec.rb
@@ -10154,7 +11604,7 @@
-
+
spec/models/donation_spec.rb
@@ -10328,7 +11778,7 @@
-
+
spec/models/post_spec.rb
@@ -11129,7 +12579,7 @@
-
+
spec/requests/artists/all_artists_spec.rb
@@ -12689,7 +14139,7 @@
-
+
spec/requests/artists/one_artist_spec.rb
@@ -13765,7 +15215,7 @@
-
+
spec/requests/artists_posts/all_artists_with_posts_spec.rb
@@ -15721,7 +17171,7 @@
-
+
spec/requests/artists_posts/mutation_create_posts_spec.rb
@@ -16500,7 +17950,7 @@
-
+
spec/requests/artists_posts/one_artist_with_posts_spec.rb
@@ -18225,7 +19675,7 @@
-
+
spec/requests/artists_posts/update_post_spec.rb
@@ -19587,7 +21037,7 @@
-
+
spec/requests/donations/create_donation_spec.rb
@@ -19618,7 +21068,7 @@
-
+
spec/requests/donations/mutation_create_donation_spec.rb
@@ -20694,7 +22144,7 @@
-
+
spec/requests/donations/update_donation_spec.rb
@@ -21979,7 +23429,7 @@
-
+
spec/workers/welcome_email_worker_spec.rb
diff --git a/schema.graphql b/schema.graphql
new file mode 100644
index 0000000..c4b1d0e
--- /dev/null
+++ b/schema.graphql
@@ -0,0 +1,206 @@
+type Artist {
+ city: String
+ createdAt: ISO8601DateTime!
+ email: String
+ id: ID!
+ medium: String
+ name: String
+ passwordDigest: String
+ posts(orderBy: PostOrderEnum): [Post!]!
+ profileImage: String
+ state: String
+ updatedAt: ISO8601DateTime!
+ zipcode: String
+}
+
+"""
+Autogenerated input type of CreateDonation
+"""
+input CreateDonationInput {
+ amount: Float!
+
+ """
+ A unique identifier for the client performing the mutation.
+ """
+ clientMutationId: String
+ email: String!
+ name: String!
+ postId: Int!
+}
+
+"""
+Autogenerated return type of CreateDonation.
+"""
+type CreateDonationPayload {
+ """
+ A unique identifier for the client performing the mutation.
+ """
+ clientMutationId: String
+ donation: Donation!
+ errors: [String!]!
+}
+
+"""
+Autogenerated input type of CreatePost
+"""
+input CreatePostInput {
+ artistId: Int!
+
+ """
+ A unique identifier for the client performing the mutation.
+ """
+ clientMutationId: String
+ currentAmount: Float!
+ details: String!
+ imageUrl: String!
+ requestedAmount: Float!
+ title: String!
+}
+
+"""
+Autogenerated return type of CreatePost.
+"""
+type CreatePostPayload {
+ """
+ A unique identifier for the client performing the mutation.
+ """
+ clientMutationId: String
+ errors: [String!]!
+ post: Post!
+}
+
+type Donation {
+ amount: Float
+ createdAt: ISO8601DateTime!
+ email: String
+ id: ID!
+ name: String
+ postId: Int!
+ updatedAt: ISO8601DateTime!
+}
+
+"""
+An ISO 8601-encoded datetime
+"""
+scalar ISO8601DateTime @specifiedBy(url: "https://tools.ietf.org/html/rfc3339")
+
+type Mutation {
+ createDonation(
+ """
+ Parameters for CreateDonation
+ """
+ input: CreateDonationInput!
+ ): CreateDonationPayload
+ createPost(
+ """
+ Parameters for CreatePost
+ """
+ input: CreatePostInput!
+ ): CreatePostPayload
+ updateDonation(
+ """
+ Parameters for UpdateDonation
+ """
+ input: UpdateDonationInput!
+ ): UpdateDonationPayload
+ updatePost(
+ """
+ Parameters for UpdatePost
+ """
+ input: UpdatePostInput!
+ ): UpdatePostPayload
+}
+
+type Post {
+ artistId: Int!
+ createdAt: ISO8601DateTime!
+ currentAmount: Float
+ details: String
+ donationPercentage: Float!
+ donations: [Donation!]!
+ id: ID!
+ imageUrl: String
+ requestedAmount: Float
+ title: String
+ updatedAt: ISO8601DateTime!
+}
+
+enum PostOrderEnum {
+ """
+ Sort by ascending order
+ """
+ ASC
+
+ """
+ Sort by descending order
+ """
+ DESC
+}
+
+type Query {
+ artist(id: ID!): Artist!
+ artists: [Artist!]!
+
+ """
+ Get a list of posts with optional sorting
+ """
+ posts(orderBy: PostOrderEnum): [Post!]!
+}
+
+"""
+Autogenerated input type of UpdateDonation
+"""
+input UpdateDonationInput {
+ amount: Float!
+
+ """
+ A unique identifier for the client performing the mutation.
+ """
+ clientMutationId: String
+ email: String!
+ id: ID!
+ name: String!
+ postId: Int!
+}
+
+"""
+Autogenerated return type of UpdateDonation.
+"""
+type UpdateDonationPayload {
+ """
+ A unique identifier for the client performing the mutation.
+ """
+ clientMutationId: String
+ donation: Donation
+ errors: [String!]!
+}
+
+"""
+Autogenerated input type of UpdatePost
+"""
+input UpdatePostInput {
+ artistId: Int!
+
+ """
+ A unique identifier for the client performing the mutation.
+ """
+ clientMutationId: String
+ currentAmount: Float!
+ details: String!
+ id: ID!
+ imageUrl: String!
+ requestedAmount: Float!
+ title: String!
+}
+
+"""
+Autogenerated return type of UpdatePost.
+"""
+type UpdatePostPayload {
+ """
+ A unique identifier for the client performing the mutation.
+ """
+ clientMutationId: String
+ errors: [String!]!
+ post: Post
+}
diff --git a/schema.json b/schema.json
new file mode 100644
index 0000000..7cd7447
--- /dev/null
+++ b/schema.json
@@ -0,0 +1,2764 @@
+{
+ "data": {
+ "__schema": {
+ "queryType": {
+ "name": "Query"
+ },
+ "mutationType": {
+ "name": "Mutation"
+ },
+ "subscriptionType": null,
+ "types": [
+ {
+ "kind": "OBJECT",
+ "name": "Artist",
+ "description": null,
+ "interfaces": [
+
+ ],
+ "possibleTypes": null,
+ "fields": [
+ {
+ "name": "city",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "createdAt",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "ISO8601DateTime",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "email",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "id",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "ID",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "medium",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "name",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "passwordDigest",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "posts",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "OBJECT",
+ "name": "Post",
+ "ofType": null
+ }
+ }
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+ {
+ "name": "orderBy",
+ "description": null,
+ "type": {
+ "kind": "ENUM",
+ "name": "PostOrderEnum",
+ "ofType": null
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ]
+ },
+ {
+ "name": "profileImage",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "state",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "updatedAt",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "ISO8601DateTime",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "zipcode",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ }
+ ],
+ "inputFields": null,
+ "enumValues": null
+ },
+ {
+ "kind": "SCALAR",
+ "name": "Boolean",
+ "description": "Represents `true` or `false` values.",
+ "interfaces": null,
+ "possibleTypes": null,
+ "fields": null,
+ "inputFields": null,
+ "enumValues": null
+ },
+ {
+ "kind": "INPUT_OBJECT",
+ "name": "CreateDonationInput",
+ "description": "Autogenerated input type of CreateDonation",
+ "interfaces": null,
+ "possibleTypes": null,
+ "fields": null,
+ "inputFields": [
+ {
+ "name": "clientMutationId",
+ "description": "A unique identifier for the client performing the mutation.",
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "amount",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Float",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "postId",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Int",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "name",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "email",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ],
+ "enumValues": null
+ },
+ {
+ "kind": "OBJECT",
+ "name": "CreateDonationPayload",
+ "description": "Autogenerated return type of CreateDonation.",
+ "interfaces": [
+
+ ],
+ "possibleTypes": null,
+ "fields": [
+ {
+ "name": "clientMutationId",
+ "description": "A unique identifier for the client performing the mutation.",
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "donation",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "OBJECT",
+ "name": "Donation",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "errors",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ }
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ }
+ ],
+ "inputFields": null,
+ "enumValues": null
+ },
+ {
+ "kind": "INPUT_OBJECT",
+ "name": "CreatePostInput",
+ "description": "Autogenerated input type of CreatePost",
+ "interfaces": null,
+ "possibleTypes": null,
+ "fields": null,
+ "inputFields": [
+ {
+ "name": "clientMutationId",
+ "description": "A unique identifier for the client performing the mutation.",
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "title",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "details",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "imageUrl",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "requestedAmount",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Float",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "currentAmount",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Float",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "artistId",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Int",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ],
+ "enumValues": null
+ },
+ {
+ "kind": "OBJECT",
+ "name": "CreatePostPayload",
+ "description": "Autogenerated return type of CreatePost.",
+ "interfaces": [
+
+ ],
+ "possibleTypes": null,
+ "fields": [
+ {
+ "name": "clientMutationId",
+ "description": "A unique identifier for the client performing the mutation.",
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "errors",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ }
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "post",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "OBJECT",
+ "name": "Post",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ }
+ ],
+ "inputFields": null,
+ "enumValues": null
+ },
+ {
+ "kind": "OBJECT",
+ "name": "Donation",
+ "description": null,
+ "interfaces": [
+
+ ],
+ "possibleTypes": null,
+ "fields": [
+ {
+ "name": "amount",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "Float",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "createdAt",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "ISO8601DateTime",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "email",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "id",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "ID",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "name",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "postId",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Int",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "updatedAt",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "ISO8601DateTime",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ }
+ ],
+ "inputFields": null,
+ "enumValues": null
+ },
+ {
+ "kind": "SCALAR",
+ "name": "Float",
+ "description": "Represents signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point).",
+ "interfaces": null,
+ "possibleTypes": null,
+ "fields": null,
+ "inputFields": null,
+ "enumValues": null
+ },
+ {
+ "kind": "SCALAR",
+ "name": "ID",
+ "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
+ "interfaces": null,
+ "possibleTypes": null,
+ "fields": null,
+ "inputFields": null,
+ "enumValues": null
+ },
+ {
+ "kind": "SCALAR",
+ "name": "ISO8601DateTime",
+ "description": "An ISO 8601-encoded datetime",
+ "interfaces": null,
+ "possibleTypes": null,
+ "fields": null,
+ "inputFields": null,
+ "enumValues": null
+ },
+ {
+ "kind": "SCALAR",
+ "name": "Int",
+ "description": "Represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.",
+ "interfaces": null,
+ "possibleTypes": null,
+ "fields": null,
+ "inputFields": null,
+ "enumValues": null
+ },
+ {
+ "kind": "OBJECT",
+ "name": "Mutation",
+ "description": null,
+ "interfaces": [
+
+ ],
+ "possibleTypes": null,
+ "fields": [
+ {
+ "name": "createDonation",
+ "description": null,
+ "type": {
+ "kind": "OBJECT",
+ "name": "CreateDonationPayload",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+ {
+ "name": "input",
+ "description": "Parameters for CreateDonation",
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "INPUT_OBJECT",
+ "name": "CreateDonationInput",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ]
+ },
+ {
+ "name": "createPost",
+ "description": null,
+ "type": {
+ "kind": "OBJECT",
+ "name": "CreatePostPayload",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+ {
+ "name": "input",
+ "description": "Parameters for CreatePost",
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "INPUT_OBJECT",
+ "name": "CreatePostInput",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ]
+ },
+ {
+ "name": "updateDonation",
+ "description": null,
+ "type": {
+ "kind": "OBJECT",
+ "name": "UpdateDonationPayload",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+ {
+ "name": "input",
+ "description": "Parameters for UpdateDonation",
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "INPUT_OBJECT",
+ "name": "UpdateDonationInput",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ]
+ },
+ {
+ "name": "updatePost",
+ "description": null,
+ "type": {
+ "kind": "OBJECT",
+ "name": "UpdatePostPayload",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+ {
+ "name": "input",
+ "description": "Parameters for UpdatePost",
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "INPUT_OBJECT",
+ "name": "UpdatePostInput",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ]
+ }
+ ],
+ "inputFields": null,
+ "enumValues": null
+ },
+ {
+ "kind": "OBJECT",
+ "name": "Post",
+ "description": null,
+ "interfaces": [
+
+ ],
+ "possibleTypes": null,
+ "fields": [
+ {
+ "name": "artistId",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Int",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "createdAt",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "ISO8601DateTime",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "currentAmount",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "Float",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "details",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "donationPercentage",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Float",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "donations",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "OBJECT",
+ "name": "Donation",
+ "ofType": null
+ }
+ }
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "id",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "ID",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "imageUrl",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "requestedAmount",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "Float",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "title",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "updatedAt",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "ISO8601DateTime",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ }
+ ],
+ "inputFields": null,
+ "enumValues": null
+ },
+ {
+ "kind": "ENUM",
+ "name": "PostOrderEnum",
+ "description": null,
+ "interfaces": null,
+ "possibleTypes": null,
+ "fields": null,
+ "inputFields": null,
+ "enumValues": [
+ {
+ "name": "ASC",
+ "description": "Sort by ascending order",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "DESC",
+ "description": "Sort by descending order",
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ]
+ },
+ {
+ "kind": "OBJECT",
+ "name": "Query",
+ "description": null,
+ "interfaces": [
+
+ ],
+ "possibleTypes": null,
+ "fields": [
+ {
+ "name": "artist",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "OBJECT",
+ "name": "Artist",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+ {
+ "name": "id",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "ID",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ]
+ },
+ {
+ "name": "artists",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "OBJECT",
+ "name": "Artist",
+ "ofType": null
+ }
+ }
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "posts",
+ "description": "Get a list of posts with optional sorting",
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "OBJECT",
+ "name": "Post",
+ "ofType": null
+ }
+ }
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+ {
+ "name": "orderBy",
+ "description": null,
+ "type": {
+ "kind": "ENUM",
+ "name": "PostOrderEnum",
+ "ofType": null
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ]
+ }
+ ],
+ "inputFields": null,
+ "enumValues": null
+ },
+ {
+ "kind": "SCALAR",
+ "name": "String",
+ "description": "Represents textual data as UTF-8 character sequences. This type is most often used by GraphQL to represent free-form human-readable text.",
+ "interfaces": null,
+ "possibleTypes": null,
+ "fields": null,
+ "inputFields": null,
+ "enumValues": null
+ },
+ {
+ "kind": "INPUT_OBJECT",
+ "name": "UpdateDonationInput",
+ "description": "Autogenerated input type of UpdateDonation",
+ "interfaces": null,
+ "possibleTypes": null,
+ "fields": null,
+ "inputFields": [
+ {
+ "name": "clientMutationId",
+ "description": "A unique identifier for the client performing the mutation.",
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "id",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "ID",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "name",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "email",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "amount",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Float",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "postId",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Int",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ],
+ "enumValues": null
+ },
+ {
+ "kind": "OBJECT",
+ "name": "UpdateDonationPayload",
+ "description": "Autogenerated return type of UpdateDonation.",
+ "interfaces": [
+
+ ],
+ "possibleTypes": null,
+ "fields": [
+ {
+ "name": "clientMutationId",
+ "description": "A unique identifier for the client performing the mutation.",
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "donation",
+ "description": null,
+ "type": {
+ "kind": "OBJECT",
+ "name": "Donation",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "errors",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ }
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ }
+ ],
+ "inputFields": null,
+ "enumValues": null
+ },
+ {
+ "kind": "INPUT_OBJECT",
+ "name": "UpdatePostInput",
+ "description": "Autogenerated input type of UpdatePost",
+ "interfaces": null,
+ "possibleTypes": null,
+ "fields": null,
+ "inputFields": [
+ {
+ "name": "clientMutationId",
+ "description": "A unique identifier for the client performing the mutation.",
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "id",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "ID",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "title",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "details",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "imageUrl",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "requestedAmount",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Float",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "currentAmount",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Float",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "artistId",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Int",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ],
+ "enumValues": null
+ },
+ {
+ "kind": "OBJECT",
+ "name": "UpdatePostPayload",
+ "description": "Autogenerated return type of UpdatePost.",
+ "interfaces": [
+
+ ],
+ "possibleTypes": null,
+ "fields": [
+ {
+ "name": "clientMutationId",
+ "description": "A unique identifier for the client performing the mutation.",
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "errors",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ }
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "post",
+ "description": null,
+ "type": {
+ "kind": "OBJECT",
+ "name": "Post",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ }
+ ],
+ "inputFields": null,
+ "enumValues": null
+ },
+ {
+ "kind": "OBJECT",
+ "name": "__Directive",
+ "description": "A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.\n\nIn some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.",
+ "interfaces": [
+
+ ],
+ "possibleTypes": null,
+ "fields": [
+ {
+ "name": "args",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "OBJECT",
+ "name": "__InputValue",
+ "ofType": null
+ }
+ }
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+ {
+ "name": "includeDeprecated",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "Boolean",
+ "ofType": null
+ },
+ "defaultValue": "false",
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ]
+ },
+ {
+ "name": "description",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "isRepeatable",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "Boolean",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "locations",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "ENUM",
+ "name": "__DirectiveLocation",
+ "ofType": null
+ }
+ }
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "name",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "onField",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Boolean",
+ "ofType": null
+ }
+ },
+ "isDeprecated": true,
+ "deprecationReason": "Use `locations`.",
+ "args": [
+
+ ]
+ },
+ {
+ "name": "onFragment",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Boolean",
+ "ofType": null
+ }
+ },
+ "isDeprecated": true,
+ "deprecationReason": "Use `locations`.",
+ "args": [
+
+ ]
+ },
+ {
+ "name": "onOperation",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Boolean",
+ "ofType": null
+ }
+ },
+ "isDeprecated": true,
+ "deprecationReason": "Use `locations`.",
+ "args": [
+
+ ]
+ }
+ ],
+ "inputFields": null,
+ "enumValues": null
+ },
+ {
+ "kind": "ENUM",
+ "name": "__DirectiveLocation",
+ "description": "A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.",
+ "interfaces": null,
+ "possibleTypes": null,
+ "fields": null,
+ "inputFields": null,
+ "enumValues": [
+ {
+ "name": "QUERY",
+ "description": "Location adjacent to a query operation.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "MUTATION",
+ "description": "Location adjacent to a mutation operation.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "SUBSCRIPTION",
+ "description": "Location adjacent to a subscription operation.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "FIELD",
+ "description": "Location adjacent to a field.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "FRAGMENT_DEFINITION",
+ "description": "Location adjacent to a fragment definition.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "FRAGMENT_SPREAD",
+ "description": "Location adjacent to a fragment spread.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "INLINE_FRAGMENT",
+ "description": "Location adjacent to an inline fragment.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "SCHEMA",
+ "description": "Location adjacent to a schema definition.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "SCALAR",
+ "description": "Location adjacent to a scalar definition.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "OBJECT",
+ "description": "Location adjacent to an object type definition.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "FIELD_DEFINITION",
+ "description": "Location adjacent to a field definition.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "ARGUMENT_DEFINITION",
+ "description": "Location adjacent to an argument definition.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "INTERFACE",
+ "description": "Location adjacent to an interface definition.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "UNION",
+ "description": "Location adjacent to a union definition.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "ENUM",
+ "description": "Location adjacent to an enum definition.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "ENUM_VALUE",
+ "description": "Location adjacent to an enum value definition.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "INPUT_OBJECT",
+ "description": "Location adjacent to an input object type definition.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "INPUT_FIELD_DEFINITION",
+ "description": "Location adjacent to an input object field definition.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "VARIABLE_DEFINITION",
+ "description": "Location adjacent to a variable definition.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ]
+ },
+ {
+ "kind": "OBJECT",
+ "name": "__EnumValue",
+ "description": "One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.",
+ "interfaces": [
+
+ ],
+ "possibleTypes": null,
+ "fields": [
+ {
+ "name": "deprecationReason",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "description",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "isDeprecated",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Boolean",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "name",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ }
+ ],
+ "inputFields": null,
+ "enumValues": null
+ },
+ {
+ "kind": "OBJECT",
+ "name": "__Field",
+ "description": "Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.",
+ "interfaces": [
+
+ ],
+ "possibleTypes": null,
+ "fields": [
+ {
+ "name": "args",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "OBJECT",
+ "name": "__InputValue",
+ "ofType": null
+ }
+ }
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+ {
+ "name": "includeDeprecated",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "Boolean",
+ "ofType": null
+ },
+ "defaultValue": "false",
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ]
+ },
+ {
+ "name": "deprecationReason",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "description",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "isDeprecated",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Boolean",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "name",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "type",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "OBJECT",
+ "name": "__Type",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ }
+ ],
+ "inputFields": null,
+ "enumValues": null
+ },
+ {
+ "kind": "OBJECT",
+ "name": "__InputValue",
+ "description": "Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.",
+ "interfaces": [
+
+ ],
+ "possibleTypes": null,
+ "fields": [
+ {
+ "name": "defaultValue",
+ "description": "A GraphQL-formatted string representing the default value for this input value.",
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "deprecationReason",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "description",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "isDeprecated",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Boolean",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "name",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "type",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "OBJECT",
+ "name": "__Type",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ }
+ ],
+ "inputFields": null,
+ "enumValues": null
+ },
+ {
+ "kind": "OBJECT",
+ "name": "__Schema",
+ "description": "A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.",
+ "interfaces": [
+
+ ],
+ "possibleTypes": null,
+ "fields": [
+ {
+ "name": "description",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "directives",
+ "description": "A list of all directives supported by this server.",
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "OBJECT",
+ "name": "__Directive",
+ "ofType": null
+ }
+ }
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "mutationType",
+ "description": "If this server supports mutation, the type that mutation operations will be rooted at.",
+ "type": {
+ "kind": "OBJECT",
+ "name": "__Type",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "queryType",
+ "description": "The type that query operations will be rooted at.",
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "OBJECT",
+ "name": "__Type",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "subscriptionType",
+ "description": "If this server support subscription, the type that subscription operations will be rooted at.",
+ "type": {
+ "kind": "OBJECT",
+ "name": "__Type",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "types",
+ "description": "A list of all types supported by this server.",
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "OBJECT",
+ "name": "__Type",
+ "ofType": null
+ }
+ }
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ }
+ ],
+ "inputFields": null,
+ "enumValues": null
+ },
+ {
+ "kind": "OBJECT",
+ "name": "__Type",
+ "description": "The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name and description, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.",
+ "interfaces": [
+
+ ],
+ "possibleTypes": null,
+ "fields": [
+ {
+ "name": "description",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "enumValues",
+ "description": null,
+ "type": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "OBJECT",
+ "name": "__EnumValue",
+ "ofType": null
+ }
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+ {
+ "name": "includeDeprecated",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "Boolean",
+ "ofType": null
+ },
+ "defaultValue": "false",
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ]
+ },
+ {
+ "name": "fields",
+ "description": null,
+ "type": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "OBJECT",
+ "name": "__Field",
+ "ofType": null
+ }
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+ {
+ "name": "includeDeprecated",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "Boolean",
+ "ofType": null
+ },
+ "defaultValue": "false",
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ]
+ },
+ {
+ "name": "inputFields",
+ "description": null,
+ "type": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "OBJECT",
+ "name": "__InputValue",
+ "ofType": null
+ }
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+ {
+ "name": "includeDeprecated",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "Boolean",
+ "ofType": null
+ },
+ "defaultValue": "false",
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ]
+ },
+ {
+ "name": "interfaces",
+ "description": null,
+ "type": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "OBJECT",
+ "name": "__Type",
+ "ofType": null
+ }
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "isOneOf",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Boolean",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "kind",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "ENUM",
+ "name": "__TypeKind",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "name",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "ofType",
+ "description": null,
+ "type": {
+ "kind": "OBJECT",
+ "name": "__Type",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "possibleTypes",
+ "description": null,
+ "type": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "OBJECT",
+ "name": "__Type",
+ "ofType": null
+ }
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ },
+ {
+ "name": "specifiedByURL",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null,
+ "args": [
+
+ ]
+ }
+ ],
+ "inputFields": null,
+ "enumValues": null
+ },
+ {
+ "kind": "ENUM",
+ "name": "__TypeKind",
+ "description": "An enum describing what kind of type a given `__Type` is.",
+ "interfaces": null,
+ "possibleTypes": null,
+ "fields": null,
+ "inputFields": null,
+ "enumValues": [
+ {
+ "name": "SCALAR",
+ "description": "Indicates this type is a scalar.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "OBJECT",
+ "description": "Indicates this type is an object. `fields` and `interfaces` are valid fields.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "INTERFACE",
+ "description": "Indicates this type is an interface. `fields` and `possibleTypes` are valid fields.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "UNION",
+ "description": "Indicates this type is a union. `possibleTypes` is a valid field.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "ENUM",
+ "description": "Indicates this type is an enum. `enumValues` is a valid field.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "INPUT_OBJECT",
+ "description": "Indicates this type is an input object. `inputFields` is a valid field.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "LIST",
+ "description": "Indicates this type is a list. `ofType` is a valid field.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "NON_NULL",
+ "description": "Indicates this type is a non-null. `ofType` is a valid field.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ]
+ }
+ ],
+ "directives": [
+ {
+ "name": "include",
+ "description": "Directs the executor to include this field or fragment only when the `if` argument is true.",
+ "locations": [
+ "FIELD",
+ "FRAGMENT_SPREAD",
+ "INLINE_FRAGMENT"
+ ],
+ "args": [
+ {
+ "name": "if",
+ "description": "Included when true.",
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Boolean",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ]
+ },
+ {
+ "name": "skip",
+ "description": "Directs the executor to skip this field or fragment when the `if` argument is true.",
+ "locations": [
+ "FIELD",
+ "FRAGMENT_SPREAD",
+ "INLINE_FRAGMENT"
+ ],
+ "args": [
+ {
+ "name": "if",
+ "description": "Skipped when true.",
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Boolean",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ]
+ },
+ {
+ "name": "deprecated",
+ "description": "Marks an element of a GraphQL schema as no longer supported.",
+ "locations": [
+ "FIELD_DEFINITION",
+ "ENUM_VALUE",
+ "ARGUMENT_DEFINITION",
+ "INPUT_FIELD_DEFINITION"
+ ],
+ "args": [
+ {
+ "name": "reason",
+ "description": "Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted in [Markdown](https://daringfireball.net/projects/markdown/).",
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "defaultValue": "\"No longer supported\"",
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ]
+ },
+ {
+ "name": "oneOf",
+ "description": "Requires that exactly one field must be supplied and that field must not be `null`.",
+ "locations": [
+ "INPUT_OBJECT"
+ ],
+ "args": [
+
+ ]
+ },
+ {
+ "name": "specifiedBy",
+ "description": "Exposes a URL that specifies the behavior of this scalar.",
+ "locations": [
+ "SCALAR"
+ ],
+ "args": [
+ {
+ "name": "url",
+ "description": "The URL that specifies the behavior of this scalar.",
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ },
+ "defaultValue": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ]
+ }
+ ]
+ }
+ }
+}
diff --git a/spec/graphql/app_schema_spec.rb b/spec/graphql/app_schema_spec.rb
new file mode 100644
index 0000000..6210d63
--- /dev/null
+++ b/spec/graphql/app_schema_spec.rb
@@ -0,0 +1,12 @@
+require 'rails_helper'
+
+RSpec.describe GearUpBeSchema, type: :graphql do
+ it 'matches the dumped schema (rails graphql:schema:dump)' do
+ aggregate_failures do
+ expected = described_class.to_definition.gsub(/\s+/, ' ')
+ actual = File.read(Rails.root.join('schema.graphql')).gsub(/\s+/, ' ')
+
+ expect(expected).to eq(actual)
+ end
+ end
+end
diff --git a/spec/support/graphql_helpers.rb b/spec/support/graphql_helpers.rb
new file mode 100644
index 0000000..41b0a24
--- /dev/null
+++ b/spec/support/graphql_helpers.rb
@@ -0,0 +1,14 @@
+module GraphQLHelpers
+ def controller
+ @controller ||= GraphqlController.new.tap do |obj|
+ obj.set_request! ActionDispatch::Request.new({})
+ end
+ end
+
+ def execute_graphql(query, **kwargs)
+ GearUpBeSchema.execute(
+ query,
+ { context: { controller: controller } }.merge(kwargs),
+ )
+ end
+end
app/controllers/application_controller.rb
@@ -745,7 +756,7 @@
app/controllers/graphql_controller.rb
@@ -1370,7 +1381,7 @@
app/graphql/gear_up_be_schema.rb
@@ -1863,7 +1874,7 @@
app/graphql/mutations/base_mutation.rb
@@ -2004,7 +2015,7 @@
app/graphql/mutations/create_donation.rb
@@ -2398,7 +2409,7 @@
app/graphql/mutations/create_post.rb
@@ -2902,7 +2913,7 @@
app/graphql/mutations/update_donation.rb
@@ -3296,7 +3307,7 @@
app/graphql/mutations/update_post.rb
@@ -3734,7 +3745,7 @@
app/graphql/types/artist_type.rb
@@ -4128,7 +4139,7 @@
app/graphql/types/base_argument.rb
@@ -4225,7 +4236,7 @@
app/graphql/types/base_connection.rb
@@ -4344,7 +4355,7 @@
app/graphql/types/base_edge.rb
@@ -4463,7 +4474,7 @@
app/graphql/types/base_field.rb
@@ -4571,7 +4582,7 @@
app/graphql/types/base_input_object.rb
@@ -4679,7 +4690,7 @@
app/graphql/types/base_interface.rb
@@ -4831,7 +4842,7 @@
app/graphql/types/base_object.rb
@@ -4961,7 +4972,7 @@
app/graphql/types/donation_type.rb
@@ -5135,7 +5146,7 @@
app/graphql/types/mutation_type.rb
@@ -5276,7 +5287,7 @@
app/graphql/types/node_type.rb
@@ -5406,7 +5417,7 @@
app/graphql/types/post_order_enum.rb
@@ -5503,7 +5514,7 @@
app/graphql/types/post_type.rb
@@ -5820,7 +5831,7 @@
app/graphql/types/query_type.rb
@@ -6423,7 +6434,7 @@
app/helpers/application_helper.rb
@@ -6476,7 +6487,7 @@
app/mailers/application_mailer.rb
@@ -6551,7 +6562,7 @@
app/mailers/welcome_mailer.rb
@@ -6681,7 +6692,7 @@
app/models/application_record.rb
@@ -6745,7 +6756,7 @@
app/models/artist.rb
@@ -6853,7 +6864,7 @@
app/models/donation.rb
@@ -6928,7 +6939,7 @@
app/models/post.rb
@@ -7190,7 +7201,7 @@
app/workers/welcome_email_worker.rb
@@ -7320,7 +7331,7 @@
config/application.rb
@@ -7758,7 +7769,7 @@
config/boot.rb
@@ -7833,7 +7844,7 @@
config/environment.rb
@@ -7919,7 +7930,7 @@
config/environments/test.rb
@@ -8610,7 +8621,7 @@
config/initializers/assets.rb
@@ -8773,7 +8784,7 @@
config/initializers/content_security_policy.rb
@@ -9079,7 +9090,7 @@
config/initializers/cors.rb
@@ -9209,7 +9220,7 @@
config/initializers/filter_parameter_logging.rb
@@ -9328,7 +9339,7 @@
config/initializers/inflections.rb
@@ -9535,7 +9546,7 @@
config/initializers/permissions_policy.rb
@@ -9687,7 +9698,7 @@
config/initializers/sidekiq.rb
@@ -9795,7 +9806,7 @@
config/routes.rb
@@ -9947,7 +9958,1446 @@
spec/mailers/welcome_mailer_spec.rb
++ + 100.0% + + + lines covered +
+ + + ++++ +
+++ +- + + + + + +
+# spec/mailers/welcome_mailer_spec.rb
+++ +- + + + + + +
++
++ +- + 1 + + + + +
+require 'rails_helper'
+++ +- + + + + + +
++
++ +- + 1 + + + + +
+RSpec.describe WelcomeMailer, type: :mailer do
+++ +- + 1 + + + + +
+describe 'donation_confirmation_email' do
+++ +- + 1 + + + + +
+it 'renders the subject' do
+++ +- + 1 + + + + +
+artist = Artist.create(
+++ +- + + + + + +
+name: 'John Doe',
+++ +- + + + + + +
+email: 'john@example.com',
+++ +- + + + + + +
+city: 'Sample City',
+++ +- + + + + + +
+state: 'Sample State',
+++ +- + + + + + +
+zipcode: '12345',
+++ +- + + + + + +
+password_digest: 'sample_password_digest',
+++ +- + + + + + +
+medium: 'Sample Medium',
+++ +- + + + + + +
+profile_image: 'sample_profile_image.jpg'
+++ +- + + + + + +
+)
+++ +- + + + + + +
++
++ +- + 1 + + + + +
+donation = Donation.create(
+++ +- + + + + + +
+name: 'Sample Name',
+++ +- + + + + + +
+email: 'donor@example.com',
+++ +- + + + + + +
+amount: 100.0,
+++ +- + + + + + +
+post_id: 1
+++ +- + + + + + +
+)
+++ +- + + + + + +
++
++ +- + 1 + + + + +
+mail = WelcomeMailer.donation_confirmation_email(artist, donation)
+++ +- + + + + + +
++
++ +- + 1 + + + + +
+expect(mail.subject).to eq('Donation Confirmation')
+++ +- + + + + + +
+end
+++ +- + + + + + +
++
++ +- + 1 + + + + +
+it 'renders the receiver email' do
+++ +- + 1 + + + + +
+artist = Artist.create(
+++ +- + + + + + +
+name: 'Jane Smith',
+++ +- + + + + + +
+email: 'jane@example.com',
+++ +- + + + + + +
+city: 'Sample City',
+++ +- + + + + + +
+state: 'Sample State',
+++ +- + + + + + +
+zipcode: '12345',
+++ +- + + + + + +
+password_digest: 'sample_password_digest',
+++ +- + + + + + +
+medium: 'Sample Medium',
+++ +- + + + + + +
+profile_image: 'sample_profile_image.jpg'
+++ +- + + + + + +
+)
+++ +- + + + + + +
++
++ +- + 1 + + + + +
+donation = Donation.create(
+++ +- + + + + + +
+name: 'Sample Name',
+++ +- + + + + + +
+email: 'donor@example.com',
+++ +- + + + + + +
+amount: 200.0,
+++ +- + + + + + +
+post_id: 2
+++ +- + + + + + +
+)
+++ +- + + + + + +
++
++ +- + 1 + + + + +
+mail = WelcomeMailer.donation_confirmation_email(artist, donation)
+++ +- + + + + + +
++
++ +- + 1 + + + + +
+expect(mail.to).to eq([artist.email])
+++ +- + + + + + +
+end
+++ +- + + + + + +
++
++ +- + 1 + + + + +
+it 'renders the sender email' do
+++ +- + 1 + + + + +
+artist = Artist.create(
+++ +- + + + + + +
+name: 'Alice Johnson',
+++ +- + + + + + +
+email: 'alice@example.com',
+++ +- + + + + + +
+city: 'Sample City',
+++ +- + + + + + +
+state: 'Sample State',
+++ +- + + + + + +
+zipcode: '12345',
+++ +- + + + + + +
+password_digest: 'sample_password_digest',
+++ +- + + + + + +
+medium: 'Sample Medium',
+++ +- + + + + + +
+profile_image: 'sample_profile_image.jpg'
+++ +- + + + + + +
+)
+++ +- + + + + + +
++
++ +- + 1 + + + + +
+donation = Donation.create(
+++ +- + + + + + +
+name: 'Sample Name',
+++ +- + + + + + +
+email: 'donor@example.com',
+++ +- + + + + + +
+amount: 300.0,
+++ +- + + + + + +
+post_id: 3
+++ +- + + + + + +
+)
+++ +- + + + + + +
++
++ +- + 1 + + + + +
+mail = WelcomeMailer.donation_confirmation_email(artist, donation)
+++ +- + + + + + +
++
++ +- + 1 + + + + +
+expect(mail.from).to eq(["from@example.com"]) # Make an email for our app and add it here
+++ +- + + + + + +
+end
+++ +- + + + + + +
++
++ +- + 1 + + + + +
+it 'assigns artist' do
+++ +- + 1 + + + + +
+artist = Artist.create(
+++ +- + + + + + +
+name: 'Bob Brown',
+++ +- + + + + + +
+email: 'bob@example.com',
+++ +- + + + + + +
+city: 'Sample City',
+++ +- + + + + + +
+state: 'Sample State',
+++ +- + + + + + +
+zipcode: '12345',
+++ +- + + + + + +
+password_digest: 'sample_password_digest',
+++ +- + + + + + +
+medium: 'Sample Medium',
+++ +- + + + + + +
+profile_image: 'sample_profile_image.jpg'
+++ +- + + + + + +
+)
+++ +- + + + + + +
++
++ +- + 1 + + + + +
+donation = Donation.create(
+++ +- + + + + + +
+name: 'Sample Name',
+++ +- + + + + + +
+email: 'donor@example.com',
+++ +- + + + + + +
+amount: 400.0,
+++ +- + + + + + +
+post_id: 4
+++ +- + + + + + +
+)
+++ +- + + + + + +
++
++ +- + 1 + + + + +
+mail = WelcomeMailer.donation_confirmation_email(artist, donation)
+++ +- + + + + + +
++
++ +- + 1 + + + + +
+expect(mail.body.encoded).to match(artist.name)
+++ +- + + + + + +
+end
+++ +- + + + + + +
++
++ +- + 1 + + + + +
+it 'assigns donation' do
+++ +- + 1 + + + + +
+artist = Artist.create(
+++ +- + + + + + +
+name: 'Charlie Davis',
+++ +- + + + + + +
+email: 'charlie@example.com',
+++ +- + + + + + +
+city: 'Sample City',
+++ +- + + + + + +
+state: 'Sample State',
+++ +- + + + + + +
+zipcode: '12345',
+++ +- + + + + + +
+password_digest: 'sample_password_digest',
+++ +- + + + + + +
+medium: 'Sample Medium',
+++ +- + + + + + +
+profile_image: 'sample_profile_image.jpg'
+++ +- + + + + + +
+)
+++ +- + + + + + +
++
++ +- + 1 + + + + +
+donation = Donation.create(
+++ +- + + + + + +
+name: 'Sample Name',
+++ +- + + + + + +
+email: 'donor@example.com',
+++ +- + + + + + +
+amount: 500.0,
+++ +- + + + + + +
+post_id: 5
+++ +- + + + + + +
+)
+++ +- + + + + + +
++
++ +- + 1 + + + + +
+mail = WelcomeMailer.donation_confirmation_email(artist, donation)
+++ +- + + + + + +
++
++ +- + 1 + + + + +
+expect(mail.body.encoded).to match(donation.amount.to_s)
+++ +- + 1 + + + + +
+expect(mail.body.encoded).to match(donation.post_id.to_s)
+++ +- + + + + + +
+end
+++ +- + + + + + +
+end
+++ +- + + + + + +
+end
+