Skip to content

Commit

Permalink
Revert non-null constrain from the HMAC key and add guard rule
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Chebotarov committed Nov 15, 2024
1 parent e8ac0d6 commit 12f6af6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions Guardfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,7 @@ guard :rspec, cmd: 'bundle exec rspec' do
"spec/requests/#{m[1]}_controller_spec.rb"
]
end

# Run schema check for any change in Graphql folder
watch(%r{^app/graphql/(.+)\.rb$}) { |m| "spec/graphql/lago_api_schema_spec.rb" }
end
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class CurrentOrganizationType < BaseOrganizationType
field :zipcode, String

field :api_key, String, permission: 'developers:keys:manage'
field :hmac_key, String, null: false, permission: 'developers:keys:manage'
field :hmac_key, String, permission: 'developers:keys:manage'
field :webhook_url, String, permission: 'developers:manage'

field :document_number_prefix, String, null: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
it { is_expected.to have_field(:zipcode).of_type('String') }

it { is_expected.to have_field(:api_key).of_type('String').with_permission('developers:keys:manage') }
it { is_expected.to have_field(:hmac_key).of_type('String!').with_permission('developers:keys:manage') }
it { is_expected.to have_field(:hmac_key).of_type('String').with_permission('developers:keys:manage') }
it { is_expected.to have_field(:webhook_url).of_type('String').with_permission('developers:manage') }

it { is_expected.to have_field(:timezone).of_type('TimezoneEnum') }
Expand Down

0 comments on commit 12f6af6

Please sign in to comment.