Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
139 changes: 139 additions & 0 deletions backend/pkg/graph/generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions backend/pkg/graph/schema.graphqls
Original file line number Diff line number Diff line change
Expand Up @@ -792,6 +792,8 @@ type Query {
searchLogs(flowId: ID!): [SearchLog!]
vectorStoreLogs(flowId: ID!): [VectorStoreLog!]
assistantLogs(flowId: ID!, assistantId: ID!): [AssistantLog!]
# Get all assistant logs for a flow across all assistants
allAssistantLogs(flowId: ID!): [AssistantLog!]

# Usage statistics and analytics
usageStatsTotal: UsageStats!
Expand Down
32 changes: 32 additions & 0 deletions backend/pkg/graph/schema.resolvers.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

60 changes: 60 additions & 0 deletions frontend/src/graphql/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3137,6 +3137,66 @@ export type AssistantLogsQueryHookResult = ReturnType<typeof useAssistantLogsQue
export type AssistantLogsLazyQueryHookResult = ReturnType<typeof useAssistantLogsLazyQuery>;
export type AssistantLogsSuspenseQueryHookResult = ReturnType<typeof useAssistantLogsSuspenseQuery>;
export type AssistantLogsQueryResult = Apollo.QueryResult<AssistantLogsQuery, AssistantLogsQueryVariables>;

// ===== allAssistantLogs query =====

export type AllAssistantLogsQueryVariables = Exact<{
flowId: Scalars['ID']['input'];
}>;

export type AllAssistantLogsQuery = { allAssistantLogs?: Array<AssistantLogFragmentFragment> | null };

export const AllAssistantLogsDocument = gql`
query allAssistantLogs($flowId: ID!) {
allAssistantLogs(flowId: $flowId) {
...assistantLogFragment
}
}
${AssistantLogFragmentFragmentDoc}
`;

/**
* __useAllAssistantLogsQuery__
*
* To run a query within a React component, call `useAllAssistantLogsQuery` and pass it any options that fit your needs.
* When your component renders, `useAllAssistantLogsQuery` returns an object from Apollo Client that contains loading, error, and data properties
* you can use to render your UI.
*
* @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
*
* @example
* const { data, loading, error } = useAllAssistantLogsQuery({
* variables: {
* flowId: // value for 'flowId'
* },
* });
*/
export function useAllAssistantLogsQuery(
baseOptions: Apollo.QueryHookOptions<AllAssistantLogsQuery, AllAssistantLogsQueryVariables> &
({ variables: AllAssistantLogsQueryVariables; skip?: boolean } | { skip: boolean }),
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useQuery<AllAssistantLogsQuery, AllAssistantLogsQueryVariables>(AllAssistantLogsDocument, options);
}

export function useAllAssistantLogsLazyQuery(
baseOptions?: Apollo.LazyQueryHookOptions<AllAssistantLogsQuery, AllAssistantLogsQueryVariables>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useLazyQuery<AllAssistantLogsQuery, AllAssistantLogsQueryVariables>(AllAssistantLogsDocument, options);
}

export function useAllAssistantLogsSuspenseQuery(
baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions<AllAssistantLogsQuery, AllAssistantLogsQueryVariables>,
) {
const options = baseOptions === Apollo.skipToken ? baseOptions : { ...defaultOptions, ...baseOptions };
return Apollo.useSuspenseQuery<AllAssistantLogsQuery, AllAssistantLogsQueryVariables>(AllAssistantLogsDocument, options);
}

export type AllAssistantLogsQueryHookResult = ReturnType<typeof useAllAssistantLogsQuery>;
export type AllAssistantLogsLazyQueryHookResult = ReturnType<typeof useAllAssistantLogsLazyQuery>;
export type AllAssistantLogsSuspenseQueryHookResult = ReturnType<typeof useAllAssistantLogsSuspenseQuery>;
export type AllAssistantLogsQueryResult = Apollo.QueryResult<AllAssistantLogsQuery, AllAssistantLogsQueryVariables>;
export const FlowReportDocument = gql`
query flowReport($id: ID!) {
flow(flowId: $id) {
Expand Down
Loading