Skip to content

Commit

Permalink
fix(export-invoices): Namespace DataExports graphQL enum types (#2275)
Browse files Browse the repository at this point in the history
## Roadmap Task

👉
https://getlago.canny.io/feature-requests/p/ability-to-export-data-from-the-user-interface


## Description

namespace graphQL data export types
  • Loading branch information
ancorcruz committed Jul 11, 2024
1 parent d10f3cd commit 1f57d60
Show file tree
Hide file tree
Showing 5 changed files with 72 additions and 68 deletions.
2 changes: 2 additions & 0 deletions app/graphql/types/data_exports/format_type_enum.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
module Types
module DataExports
class FormatTypeEnum < Types::BaseEnum
graphql_name 'DataExportFormatTypeEnum'

DataExport::EXPORT_FORMATS.each do |format|
value format
end
Expand Down
2 changes: 2 additions & 0 deletions app/graphql/types/data_exports/status_enum.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
module Types
module DataExports
class StatusEnum < Types::BaseEnum
graphql_name 'DataExportStatusEnum'

DataExport::STATUSES.each do |status|
value status
end
Expand Down
26 changes: 13 additions & 13 deletions schema.graphql

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

108 changes: 54 additions & 54 deletions schema.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion spec/graphql/types/data_exports/object_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
subject { described_class }

it { is_expected.to have_field(:id).of_type('ID!') }
it { is_expected.to have_field(:status).of_type('StatusEnum!') }
it { is_expected.to have_field(:status).of_type('DataExportStatusEnum!') }
end

0 comments on commit 1f57d60

Please sign in to comment.