Nested GraphQL query is not working in Apollo client

const res = await client.query({
query: gql query Query { getDataList(query: { type: "test"}, limit: 2) { ...on sampleBase { id } } } ,

unable to receive the sampleBase id in output

Is the type there really called sampleBase? That seems uncommon, most GraphQL types start with a big character. Can you show the schema you are working with?

Hi sampleBase is wrong SampleBase is right.
I can’t able to view inside data in Query

I’m sorry, you need to be a lot more specific. After you corrected your fragment spelling there, what response do you get from the server, and what response do you expect?
Also, is SampleBase an interface, or a type? In the case of an interface, are you using possibleTypes?