Skip to content

Commit 49cd570

Browse files
committed
Intentional pipeline failure
1 parent aea7faa commit 49cd570

File tree

1 file changed

+49
-53
lines changed
  • packages/data-schema/src/runtime/internals/operations

1 file changed

+49
-53
lines changed

packages/data-schema/src/runtime/internals/operations/get.ts

Lines changed: 49 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -109,59 +109,55 @@ function _get(
109109
const userAgentOverride = createUserAgentOverride(customUserAgentDetails);
110110

111111
try {
112-
const basePromise = context
113-
? ((client as BaseSSRClient).graphql(
114-
context,
115-
{
116-
...auth,
117-
query,
118-
variables,
119-
},
120-
headers,
121-
) as Promise<GraphQLResult>)
122-
: ((client as BaseBrowserClient).graphql(
123-
{
124-
...auth,
125-
query,
126-
variables,
127-
...userAgentOverride,
128-
},
129-
headers,
130-
) as Promise<GraphQLResult>);
131-
132-
const extendedPromise = extendCancellability(basePromise, resultPromise);
133-
const { data, extensions } = await extendedPromise;
134-
135-
// flatten response
136-
if (data) {
137-
const [key] = Object.keys(data);
138-
const flattenedResult = flattenItems(
139-
modelIntrospection,
140-
name,
141-
data[key],
142-
);
143-
144-
if (flattenedResult === null) {
145-
return { data: null, extensions };
146-
} else if (options?.selectionSet) {
147-
return { data: flattenedResult, extensions };
148-
} else {
149-
// TODO: refactor to avoid destructuring here
150-
const [initialized] = initializeModel(
151-
client,
152-
name,
153-
[flattenedResult],
154-
modelIntrospection,
155-
auth.authMode,
156-
auth.authToken,
157-
!!context,
158-
);
159-
160-
return { data: initialized, extensions };
161-
}
162-
} else {
163-
return { data: null, extensions };
164-
}
112+
// const basePromise = context
113+
// ? ((client as BaseSSRClient).graphql(
114+
// context,
115+
// {
116+
// ...auth,
117+
// query,
118+
// variables,
119+
// },
120+
// headers,
121+
// ) as Promise<GraphQLResult>)
122+
// : ((client as BaseBrowserClient).graphql(
123+
// {
124+
// ...auth,
125+
// query,
126+
// variables,
127+
// ...userAgentOverride,
128+
// },
129+
// headers,
130+
// ) as Promise<GraphQLResult>);
131+
// const extendedPromise = extendCancellability(basePromise, resultPromise);
132+
// const { data, extensions } = await extendedPromise;
133+
// // flatten response
134+
// if (data) {
135+
// const [key] = Object.keys(data);
136+
// const flattenedResult = flattenItems(
137+
// modelIntrospection,
138+
// name,
139+
// data[key],
140+
// );
141+
// if (flattenedResult === null) {
142+
// return { data: null, extensions };
143+
// } else if (options?.selectionSet) {
144+
// return { data: flattenedResult, extensions };
145+
// } else {
146+
// // TODO: refactor to avoid destructuring here
147+
// const [initialized] = initializeModel(
148+
// client,
149+
// name,
150+
// [flattenedResult],
151+
// modelIntrospection,
152+
// auth.authMode,
153+
// auth.authToken,
154+
// !!context,
155+
// );
156+
// return { data: initialized, extensions };
157+
// }
158+
// } else {
159+
// return { data: null, extensions };
160+
// }
165161
} catch (error: any) {
166162
/**
167163
* The `data` type returned by `error` here could be:

0 commit comments

Comments
 (0)