usebruno / bruno

Opensource IDE For Exploring and Testing Api's (lightweight alternative to postman/insomnia)
https://www.usebruno.com/
MIT License
25.67k stars 1.17k forks source link

Crashing when switching from GraphQL variables back to request body #2450

Open idmyn opened 3 months ago

idmyn commented 3 months ago

I have checked the following:

Describe the bug

If I have a salesforce GraphQL query and switch from the variables tab back to the request body tab then I land on the bruno error screen

The API isn't publicly accessible and I'm not a GraphQL expert so I can't help much in reproducing/debugging but here's what I've observed:

.bru file to reproduce the bug

meta {
  name: foo
  type: graphql
  seq: 5
}

post {
  url: {{SALESFORCE_DOMAIN}}/services/data/v60.0/graphql
  body: graphql
  auth: bearer
}

auth:bearer {
  token: {{SALESFORCE_ACCESS_TOKEN}}
}

body:graphql {
  query Foo {
    uiapi {
      query {
        Case {
          totalCount
        }
      }
    }
  }
}

Screenshots/Live demo link

CleanShot 2024-06-12 at 16 20 08@2x

https://github.com/usebruno/bruno/assets/4623769/87f09a86-8a45-4cfe-b3f0-f4f0a4ca6b34

gagan2125 commented 3 months ago

meta { name: foo type: graphql seq: 5 }

post { url: {{SALESFORCE_DOMAIN}}/services/data/v60.0/graphql body: graphql auth: bearer }

auth: bearer { token: {{SALESFORCE_ACCESS_TOKEN}} }

body: graphql { query: | query Foo { uiapi { query { Case { totalCount } } } } }

try this one

If the issue remains unresolved, report it with the following details:

Exact steps to reproduce the error. Environment details. Simplified GraphQL query causing the issue. Any relevant logs or console errors.

sanjai0py commented 3 months ago

Hey @idmyn, please share more information and if possible, the error object from the console.

Screenshot 2024-06-14 at 12 25 32 PM
idmyn commented 3 months ago

Hi @sanjai0py, sorry I only just got round to reproducing this. I don't have any more information other than what I shared originally but here's the info from the devtools console:

{
    "error": {message: "Input Object type AccountPartnerUpdateRepresentation must define one or more fields.

Input Object type AppAnalyticsQueryRequestUpdateRepresentation must define one or more fields.

Input Object type AppMenuItemUpdateRepresentation must define one or more fields.

Input Object type AppUsageAssignmentUpdateRepresentation must define one or more fields.

Input Object type CaseMilestoneUpdateRepresentation must define one or more fields.

Input Object type ContentDocumentUpdateRepresentation must define one or more fields.

Input Object type CreditMemoInvApplicationUpdateRepresentation must define one or more fields.

Input Object type CreditMemoLineUpdateRepresentation must define one or more fields.

Input Object type CreditMemoUpdateRepresentation must define one or more fields.

Input Object type EntitlementContactUpdateRepresentation must define one or more fields.

Input Object type EntityMilestoneUpdateRepresentation must define one or more fields.

Input Object type FinanceBalanceSnapshotUpdateRepresentation must define one or more fields.

Input Object type FlowOrchestrationInstanceUpdateRepresentation must define one or more fields.

Input Object type FlowOrchestrationStageInstanceUpdateRepresentation must define one or more fields.

Input Object type FlowOrchestrationStepInstanceUpdateRepresentation must define one or more fields.

Input Object type FlowOrchestrationWorkItemUpdateRepresentation must define one or more fields.

Input Object type FlowRecordUpdateRepresentation must define one or more fields.

Input Object type InvoiceLineUpdateRepresentation must define one or more fields.

Input Object type InvoiceUpdateRepresentation must define one or more fields.

Input Object type LearningItemUpdateRepresentation must define one or more fields.

Input Object type LocationGroupAssignmentUpdateRepresentation must define one or more fields.

Input Object type NamespaceRegistryCreateRepresentation must define one or more fields.

Input Object type NamespaceRegistryUpdateRepresentation must define one or more fields.

Input Object type OpportunityPartnerUpdateRepresentation must define one or more fields.

Enum type OrderByType must define one or more values.

Input Object type OrganizationUpdateRepresentation must define one or more fields.

Input Object type PartnerUpdateRepresentation must define one or more fields.

Input Object type PromotionSegmentBuyerGroupUpdateRepresentation must define one or more fields.

Input Object type PromotionSegmentSalesStoreUpdateRepresentation must define one or more fields.

Input Object type ServiceTerritoryWorkTypeUpdateRepresentation must define one or more fields.

Input Object type Setup__JoinInput must define one or more fields.

Type Setup__SetupQuery must define one or more fields.

Input Object type TopicAssignmentUpdateRepresentation must define one or more fields.

Input Object type VoiceCallUpdateRepresentation must define one or more fields.

Input Object type WaitlistWorkTypeUpdateRepresentation must define one or more fields.

Input Object type WebStoreCatalogUpdateRepresentation must define one or more fields.

Input Object type WorkTypeGroupMemberUpdateRepresentation must define one or more fields.", stack: "Error: Input Object type AccountPartnerUpdateRepresentation must define one or more fields.

Input Object type AppAnalyticsQueryRequestUpdateRepresentation must define one or more fields.

Input Object type AppMenuItemUpdateRepresentation must define one or more fields.

Input Object type AppUsageAssignmentUpdateRepresentation must define one or more fields.

Input Object type CaseMilestoneUpdateRepresentation must define one or more fields.

Input Object type ContentDocumentUpdateRepresentation must define one or more fields.

Input Object type CreditMemoInvApplicationUpdateRepresentation must define one or more fields.

Input Object type CreditMemoLineUpdateRepresentation must define one or more fields.

Input Object type CreditMemoUpdateRepresentation must define one or more fields.

Input Object type EntitlementContactUpdateRepresentation must define one or more fields.

Input Object type EntityMilestoneUpdateRepresentation must define one or more fields.

Input Object type FinanceBalanceSnapshotUpdateRepresentation must define one or more fields.

Input Object type FlowOrchestrationInstanceUpdateRepresentation must define one or more fields.

Input Object type FlowOrchestrationStageInstanceUpdateRepresentation must define one or more fields.

Input Object type FlowOrchestrationStepInstanceUpdateRepresentation must define one or more fields.

Input Object type FlowOrchestrationWorkItemUpdateRepresentation must define one or more fields.

Input Object type FlowRecordUpdateRepresentation must define one or more fields.

Input Object type InvoiceLineUpdateRepresentation must define one or more fields.

Input Object type InvoiceUpdateRepresentation must define one or more fields.

Input Object type LearningItemUpdateRepresentation must define one or more fields.

Input Object type LocationGroupAssignmentUpdateRepresentation must define one or more fields.

Input Object type NamespaceRegistryCreateRepresentation must define one or more fields.

Input Object type NamespaceRegistryUpdateRepresentation must define one or more fields.

Input Object type OpportunityPartnerUpdateRepresentation must define one or more fields.

Enum type OrderByType must define one or more values.

Input Object type OrganizationUpdateRepresentation must define one or more fields.

Input Object type PartnerUpdateRepresentation must define one or more fields.

Input Object type PromotionSegmentBuyerGroupUpdateRepresentation must define one or more fields.

Input Object type PromotionSegmentSalesStoreUpdateRepresentation must define one or more fields.

Input Object type ServiceTerritoryWorkTypeUpdateRepresentation must define one or more fields.

Input Object type Setup__JoinInput must define one or more fields.

Type Setup__SetupQuery must define one or more fields.

Input Object type TopicAssignmentUpdateRepresentation must define one or more fields.

Input Object type VoiceCallUpdateRepresentation must define one or more fields.

Input Object type WaitlistWorkTypeUpdateRepresentation must define one or more fields.

Input Object type WebStoreCatalogUpdateRepresentation must define one or more fields.

Input Object type WorkTypeGroupMemberUpdateRepresentation must define one or more fields.
    at assertValidSchema (file:///Applications/Bruno.app/Contents/Resources/app.asar/web/_next/static/chunks/333-55c3bd8f51d678d1.js:140:53838)
    at validate (file:///Applications/Bruno.app/Contents/Resources/app.asar/web/_next/static/chunks/333-55c3bd8f51d678d1.js:245:39913)
    at validateWithCustomRules (file:///Applications/Bruno.app/Contents/Resources/app.asar/web/_next/static/chunks/333-55c3bd8f51d678d1.js:15:2934)
    at validateQuery (file:///Applications/Bruno.app/Contents/Resources/app.asar/web/_next/static/chunks/333-55c3bd8f51d678d1.js:15:6447)
    at Module.getDiagnostics (file:///Applications/Bruno.app/Contents/Resources/app.asar/web/_next/static/chunks/333-55c3bd8f51d678d1.js:15:6359)
    at file:///Applications/Bruno.app/Contents/Resources/app.asar/web/_next/static/chunks/333-55c3bd8f51d678d1.js:5:8444
    at startLinting (file:///Applications/Bruno.app/Contents/Resources/app.asar/web/_next/static/chunks/333-55c3bd8f51d678d1.js:5:60580)
    at Object.lint (file:///Applications/Bruno.app/Contents/Resources/app.asar/web/_next/static/chunks/333-55c3bd8f51d678d1.js:5:62605)
    at new CodeMirror (file:///Applications/Bruno.app/Contents/Resources/app.asar/web/_next/static/chunks/pages/_app-92e2050d0799eab9.js:6:193699)
    at CodeMirror (file:///Applications/Bruno.app/Contents/Resources/app.asar/web/_next/static/chunks/pages/_app-92e2050d0799eab9.js:6:192636)"},
    "errorInfo": {
        "componentStack": "\n    at QueryEditor (file:///Applications/Bruno.app/Contents/Resources/app.asar/web/_next/static/chunks/443-87262752453bea5b.js:1:68224)\n    at section\n    at div\n    at P (file:///Applications/Bruno.app/Contents/Resources/app.asar/web/_next/static/chunks/pages/_app-92e2050d0799eab9.js:31:39282)\n    at RequestPane_GraphQLRequestPane (file:///Applications/Bruno.app/Contents/Resources/app.asar/web/_next/static/chunks/443-87262752453bea5b.js:1:126696)\n    at div\n    at section\n    at section\n    at div\n    at P (file:///Applications/Bruno.app/Contents/Resources/app.asar/web/_next/static/chunks/pages/_app-92e2050d0799eab9.js:31:39282)\n    at components_RequestTabPanel (file:///Applications/Bruno.app/Contents/Resources/app.asar/web/_next/static/chunks/443-87262752453bea5b.js:1:325774)\n    at section\n    at div\n    at P (file:///Applications/Bruno.app/Contents/Resources/app.asar/web/_next/static/chunks/pages/_app-92e2050d0799eab9.js:31:39282)\n    at div\n    at Main (file:///Applications/Bruno.app/Contents/Resources/app.asar/web/_next/static/chunks/443-87262752453bea5b.js:1:544315)\n    at main\n    at div\n    at Home\n    at div\n    at HotkeysProvider (file:///Applications/Bruno.app/Contents/Resources/app.asar/web/_next/static/chunks/pages/_app-92e2050d0799eab9.js:17:54477)\n    at div\n    at P (file:///Applications/Bruno.app/Contents/Resources/app.asar/web/_next/static/chunks/pages/_app-92e2050d0799eab9.js:31:39282)\n    at AppProvider (file:///Applications/Bruno.app/Contents/Resources/app.asar/web/_next/static/chunks/pages/_app-92e2050d0799eab9.js:14:51290)\n    at GoldenEdtionGuardProvider (file:///Applications/Bruno.app/Contents/Resources/app.asar/web/_next/static/chunks/pages/_app-92e2050d0799eab9.js:17:60862)\n    at div\n    at ToastProvider (file:///Applications/Bruno.app/Contents/Resources/app.asar/web/_next/static/chunks/pages/_app-92e2050d0799eab9.js:14:52551)\n    at Le (file:///Applications/Bruno.app/Contents/Resources/app.asar/web/_next/static/chunks/pages/_app-92e2050d0799eab9.js:31:37102)\n    at Theme (file:///Applications/Bruno.app/Contents/Resources/app.asar/web/_next/static/chunks/pages/_app-92e2050d0799eab9.js:17:163953)\n    at components_Provider (file:///Applications/Bruno.app/Contents/Resources/app.asar/web/_next/static/chunks/pages/_app-92e2050d0799eab9.js:24:3949)\n    at NoSsr (file:///Applications/Bruno.app/Contents/Resources/app.asar/web/_next/static/chunks/pages/_app-92e2050d0799eab9.js:17:59403)\n    at div\n    at SafeHydrate (file:///Applications/Bruno.app/Contents/Resources/app.asar/web/_next/static/chunks/pages/_app-92e2050d0799eab9.js:17:59299)\n    at ErrorBoundary (file:///Applications/Bruno.app/Contents/Resources/app.asar/web/_next/static/chunks/pages/_app-92e2050d0799eab9.js:14:36821)\n    at _app (file:///Applications/Bruno.app/Contents/Resources/app.asar/web/_next/static/chunks/pages/_app-92e2050d0799eab9.js:17:59533)\n    at _PathnameContextProviderAdapter (file:///Applications/Bruno.app/Contents/Resources/app.asar/web/_next/static/chunks/main-a9033015b47bbde8.js:1:62713)\n    at Container (file:///Applications/Bruno.app/Contents/Resources/app.asar/web/_next/static/chunks/main-a9033015b47bbde8.js:1:9068)\n    at AppContainer (file:///Applications/Bruno.app/Contents/Resources/app.asar/web/_next/static/chunks/main-a9033015b47bbde8.js:1:11134)\n    at Root (file:///Applications/Bruno.app/Contents/Resources/app.asar/web/_next/static/chunks/main-a9033015b47bbde8.js:1:14776)"
    }
}