Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(quote)!: remove internal fields from schema #2858

Merged
merged 8 commits into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,7 @@ body:graphql {
quote {
createdAt
expiresAt
highEstimatedExchangeRate
id
lowEstimatedExchangeRate
maxPacketAmount
minExchangeRate
walletAddressId
receiveAmount {
assetCode
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,7 @@ body:graphql {
quote {
createdAt
expiresAt
highEstimatedExchangeRate
id
lowEstimatedExchangeRate
maxPacketAmount
minExchangeRate
walletAddressId
receiveAmount {
assetCode
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,8 @@ body:graphql {
quote {
createdAt
expiresAt
highEstimatedExchangeRate
id
lowEstimatedExchangeRate
maxPacketAmount
minExchangeRate
estimatedExchangeRate
golobitch marked this conversation as resolved.
Show resolved Hide resolved
walletAddressId
receiveAmount {
assetCode
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,9 @@ body:graphql {
quote {
createdAt
expiresAt
highEstimatedExchangeRate
id
lowEstimatedExchangeRate
maxPacketAmount
minExchangeRate
walletAddressId
estimatedExchangeRate
receiveAmount {
assetCode
assetScale
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,8 @@ body:graphql {
quote {
createdAt
expiresAt
highEstimatedExchangeRate
id
lowEstimatedExchangeRate
maxPacketAmount
minExchangeRate
estimatedExchangeRate
walletAddressId
receiveAmount {
assetCode
Expand Down
4 changes: 0 additions & 4 deletions bruno/collections/Rafiki/Rafiki Admin APIs/Create Quote.bru
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,7 @@ body:graphql {
quote {
createdAt
expiresAt
highEstimatedExchangeRate
id
lowEstimatedExchangeRate
maxPacketAmount
minExchangeRate
walletAddressId
receiveAmount {
assetCode
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,9 @@ body:graphql {
quote {
createdAt
expiresAt
highEstimatedExchangeRate
id
lowEstimatedExchangeRate
maxPacketAmount
minExchangeRate
walletAddressId
estimatedExchangeRate
receiveAmount {
assetCode
assetScale
Expand Down
5 changes: 1 addition & 4 deletions bruno/collections/Rafiki/Rafiki Admin APIs/Get Quote.bru
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,10 @@ body:graphql {
query GetQuote($id: String!) {
quote(id: $id) {
createdAt
highEstimatedExchangeRate
expiresAt
id
lowEstimatedExchangeRate
maxPacketAmount
minExchangeRate
walletAddressId
estimatedExchangeRate
receiveAmount {
assetCode
assetScale
Expand Down
15 changes: 3 additions & 12 deletions localenv/mock-account-servicing-entity/generated/graphql.ts

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

68 changes: 8 additions & 60 deletions packages/backend/src/graphql/generated/graphql.schema.json

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

15 changes: 3 additions & 12 deletions packages/backend/src/graphql/generated/graphql.ts

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

14 changes: 4 additions & 10 deletions packages/backend/src/graphql/resolvers/outgoing_payment.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,10 +198,7 @@ describe('OutgoingPayment Resolvers', (): void => {
metadata
quote {
id
maxPacketAmount
minExchangeRate
lowEstimatedExchangeRate
highEstimatedExchangeRate
estimatedExchangeRate
createdAt
expiresAt
}
Expand Down Expand Up @@ -245,14 +242,11 @@ describe('OutgoingPayment Resolvers', (): void => {
metadata,
quote: {
id: payment.quote.id,
maxPacketAmount: payment.quote.maxPacketAmount.toString(),
minExchangeRate: payment.quote.minExchangeRate.valueOf(),
lowEstimatedExchangeRate:
payment.quote.lowEstimatedExchangeRate.valueOf(),
highEstimatedExchangeRate:
payment.quote.highEstimatedExchangeRate.valueOf(),
createdAt: payment.quote.createdAt.toISOString(),
expiresAt: payment.quote.expiresAt.toISOString(),
estimatedExchangeRate: payment.quote.estimatedExchangeRate
? parseFloat(payment.quote.estimatedExchangeRate?.toString())
: undefined,
__typename: 'Quote'
},
createdAt: payment.createdAt.toISOString(),
Expand Down
8 changes: 0 additions & 8 deletions packages/backend/src/graphql/resolvers/quote.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,6 @@ describe('Quote Resolvers', (): void => {
assetCode
assetScale
}
maxPacketAmount
minExchangeRate
lowEstimatedExchangeRate
highEstimatedExchangeRate
createdAt
expiresAt
}
Expand Down Expand Up @@ -124,10 +120,6 @@ describe('Quote Resolvers', (): void => {
assetScale: quote.receiveAmount.assetScale,
__typename: 'Amount'
},
maxPacketAmount: quote.maxPacketAmount.toString(),
minExchangeRate: quote.minExchangeRate.valueOf(),
lowEstimatedExchangeRate: quote.lowEstimatedExchangeRate.valueOf(),
highEstimatedExchangeRate: quote.highEstimatedExchangeRate.valueOf(),
createdAt: quote.createdAt.toISOString(),
expiresAt: quote.expiresAt.toISOString(),
__typename: 'Quote'
Expand Down
7 changes: 2 additions & 5 deletions packages/backend/src/graphql/resolvers/quote.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,8 @@ export function quoteToGraphql(quote: Quote): SchemaQuote {
receiver: quote.receiver,
debitAmount: quote.debitAmount,
receiveAmount: quote.receiveAmount,
maxPacketAmount: quote.maxPacketAmount,
minExchangeRate: quote.minExchangeRate.valueOf(),
lowEstimatedExchangeRate: quote.lowEstimatedExchangeRate.valueOf(),
highEstimatedExchangeRate: quote.highEstimatedExchangeRate.valueOf(),
createdAt: new Date(+quote.createdAt).toISOString(),
expiresAt: new Date(+quote.expiresAt).toISOString()
expiresAt: new Date(+quote.expiresAt).toISOString(),
estimatedExchangeRate: quote.estimatedExchangeRate?.valueOf()
}
}
10 changes: 2 additions & 8 deletions packages/backend/src/graphql/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -957,18 +957,12 @@ type Quote {
debitAmount: Amount!
"Amount to receive (fixed receive)"
receiveAmount: Amount!
"Maximum value per packet allowed on the possible routes"
maxPacketAmount: UInt64!
"Aggregate exchange rate the payment is guaranteed to meet"
minExchangeRate: Float!
"Lower bound of probed exchange rate"
lowEstimatedExchangeRate: Float!
"Upper bound of probed exchange rate"
highEstimatedExchangeRate: Float!
"Date-time of creation"
createdAt: String!
"Date-time of expiration"
expiresAt: String!
"Estimated exchange rate"
estimatedExchangeRate: Float
}

input AmountInput {
Expand Down
15 changes: 3 additions & 12 deletions packages/frontend/app/generated/graphql.ts

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

Loading
Loading