feat(pipeline-task): 实时展示执行日志
This commit is contained in:
@ -17,7 +17,7 @@ import { getMainDefinition } from "@apollo/client/utilities";
|
||||
import { useSnackbar } from "notistack";
|
||||
|
||||
const schema = buildClientSchema(
|
||||
(introspectionResult as unknown) as IntrospectionQuery
|
||||
introspectionResult as unknown as IntrospectionQuery
|
||||
);
|
||||
|
||||
const typesMap = {
|
||||
@ -70,13 +70,28 @@ export const FennecApolloClientProvider: FC = ({ children }) => {
|
||||
);
|
||||
const link = ApolloLink.from([
|
||||
errorLink,
|
||||
(withScalars({ schema, typesMap }) as unknown) as ApolloLink,
|
||||
withScalars({ schema, typesMap }) as unknown as ApolloLink,
|
||||
splitLink,
|
||||
]);
|
||||
const client = new ApolloClient({
|
||||
ssrMode: typeof window === "undefined",
|
||||
link,
|
||||
cache: new InMemoryCache(),
|
||||
cache: new InMemoryCache({
|
||||
typePolicies: {
|
||||
// PipelineTaskLogs: {
|
||||
// keyFields: ["unit"],
|
||||
// },
|
||||
// PipelineTask: {
|
||||
// fields: {
|
||||
// logs: {
|
||||
// merge(existing = [], incoming: any[]) {
|
||||
// return [...existing, ...incoming];
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
},
|
||||
}),
|
||||
});
|
||||
|
||||
return <ApolloProvider client={client}>{children}</ApolloProvider>;
|
||||
|
Reference in New Issue
Block a user