fix: network params query name clash which was blocking type generation (#1490)

This commit is contained in:
Matthew Russell 2022-09-26 18:04:40 -04:00 committed by GitHub
parent 69db3fdecb
commit 3aca9207ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 10 additions and 45 deletions

View File

@ -5,9 +5,9 @@ import { mockWalletContext } from '../../test-helpers/mocks';
import { AppStateProvider } from '../../../../contexts/app-state/app-state-provider';
import { VegaWalletContext } from '@vegaprotocol/wallet';
import { MemoryRouter as Router } from 'react-router-dom';
import { gql } from '@apollo/client';
import type { NetworkParamsQuery } from '@vegaprotocol/web3';
import type { MockedResponse } from '@apollo/client/testing';
import { NETWORK_PARAMETERS_QUERY } from '@vegaprotocol/react-helpers';
jest.mock('@vegaprotocol/environment', () => ({
useEnvironment: () => ({
@ -17,14 +17,7 @@ jest.mock('@vegaprotocol/environment', () => ({
const updateMarketNetworkParamsQueryMock: MockedResponse<NetworkParamsQuery> = {
request: {
query: gql`
query NetworkParams {
networkParameters {
key
value
}
}
`,
query: NETWORK_PARAMETERS_QUERY,
},
result: {
data: {

View File

@ -5,9 +5,9 @@ import { mockWalletContext } from '../../test-helpers/mocks';
import { AppStateProvider } from '../../../../contexts/app-state/app-state-provider';
import { VegaWalletContext } from '@vegaprotocol/wallet';
import { MemoryRouter as Router } from 'react-router-dom';
import { gql } from '@apollo/client';
import type { NetworkParamsQuery } from '@vegaprotocol/web3';
import type { MockedResponse } from '@apollo/client/testing';
import { NETWORK_PARAMETERS_QUERY } from '@vegaprotocol/react-helpers';
jest.mock('@vegaprotocol/environment', () => ({
useEnvironment: () => ({
@ -17,14 +17,7 @@ jest.mock('@vegaprotocol/environment', () => ({
const updateMarketNetworkParamsQueryMock: MockedResponse<NetworkParamsQuery> = {
request: {
query: gql`
query NetworkParams {
networkParameters {
key
value
}
}
`,
query: NETWORK_PARAMETERS_QUERY,
},
result: {
data: {

View File

@ -5,9 +5,9 @@ import { VegaWalletContext } from '@vegaprotocol/wallet';
import { AppStateProvider } from '../../../../contexts/app-state/app-state-provider';
import { mockWalletContext } from '../../test-helpers/mocks';
import { ProposeNewAsset } from './propose-new-asset';
import { gql } from '@apollo/client';
import type { NetworkParamsQuery } from '@vegaprotocol/web3';
import type { MockedResponse } from '@apollo/client/testing';
import { NETWORK_PARAMETERS_QUERY } from '@vegaprotocol/react-helpers';
jest.mock('@vegaprotocol/environment', () => ({
useEnvironment: () => ({
@ -17,14 +17,7 @@ jest.mock('@vegaprotocol/environment', () => ({
const updateMarketNetworkParamsQueryMock: MockedResponse<NetworkParamsQuery> = {
request: {
query: gql`
query NetworkParams {
networkParameters {
key
value
}
}
`,
query: NETWORK_PARAMETERS_QUERY,
},
result: {
data: {

View File

@ -1,4 +1,3 @@
import { gql } from '@apollo/client';
import { render, screen, waitFor } from '@testing-library/react';
import { ProposeNewMarket } from './propose-new-market';
import { MockedProvider } from '@apollo/client/testing';
@ -8,6 +7,7 @@ import { VegaWalletContext } from '@vegaprotocol/wallet';
import { BrowserRouter as Router } from 'react-router-dom';
import type { MockedResponse } from '@apollo/client/testing';
import type { NetworkParamsQuery } from '@vegaprotocol/web3';
import { NETWORK_PARAMETERS_QUERY } from '@vegaprotocol/react-helpers';
jest.mock('@vegaprotocol/environment', () => ({
useEnvironment: () => ({
@ -17,14 +17,7 @@ jest.mock('@vegaprotocol/environment', () => ({
const newMarketNetworkParamsQueryMock: MockedResponse<NetworkParamsQuery> = {
request: {
query: gql`
query NetworkParams {
networkParameters {
key
value
}
}
`,
query: NETWORK_PARAMETERS_QUERY,
},
result: {
data: {

View File

@ -9,18 +9,11 @@ import { ProposeUpdateMarket } from './propose-update-market';
import type { NetworkParamsQuery } from '@vegaprotocol/web3';
import { MARKETS_QUERY } from './propose-update-market';
import type { ProposalMarketsQuery } from './__generated__/ProposalMarketsQuery';
import { gql } from '@apollo/client';
import { NETWORK_PARAMETERS_QUERY } from '@vegaprotocol/react-helpers';
const updateMarketNetworkParamsQueryMock: MockedResponse<NetworkParamsQuery> = {
request: {
query: gql`
query NetworkParams {
networkParameters {
key
value
}
}
`,
query: NETWORK_PARAMETERS_QUERY,
},
result: {
data: {