chore: Rename getSamlAuthProviders as listSamlAuthProviders query

This commit is contained in:
Faruk AYDIN
2023-08-07 16:22:00 +02:00
parent 40e10cc270
commit 4b706e004d
7 changed files with 23 additions and 24 deletions

View File

@@ -1,11 +0,0 @@
import { gql } from '@apollo/client';
export const GET_SAML_AUTH_PROVIDERS = gql`
query GetSamlAuthProviders {
getSamlAuthProviders {
id
name
issuer
}
}
`;

View File

@@ -0,0 +1,11 @@
import { gql } from '@apollo/client';
export const LIST_SAML_AUTH_PROVIDERS = gql`
query ListSamlAuthProviders {
listSamlAuthProviders {
id
name
issuer
}
}
`;

View File

@@ -1,7 +1,7 @@
import { useQuery } from '@apollo/client';
import { TSamlAuthProvider } from '@automatisch/types';
import { GET_SAML_AUTH_PROVIDERS } from 'graphql/queries/get-saml-auth-providers.ee';
import { LIST_SAML_AUTH_PROVIDERS } from 'graphql/queries/list-saml-auth-providers.ee';
type UseSamlAuthProvidersReturn = {
providers: TSamlAuthProvider[];
@@ -9,10 +9,10 @@ type UseSamlAuthProvidersReturn = {
};
export default function useSamlAuthProviders(): UseSamlAuthProvidersReturn {
const { data, loading } = useQuery(GET_SAML_AUTH_PROVIDERS);
const { data, loading } = useQuery(LIST_SAML_AUTH_PROVIDERS);
return {
providers: data?.getSamlAuthProviders || [],
loading
providers: data?.listSamlAuthProviders || [],
loading,
};
}