Skip to content

Commit 97f003f

Browse files
committed
feat(352 | typesync.v2): remove unused prop from query
1 parent d02241b commit 97f003f

File tree

3 files changed

+15
-10
lines changed

3 files changed

+15
-10
lines changed

packages/hypergraph/typesync-studio/src/generated/gql.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/
1515
*/
1616
type Documents = {
1717
"\n query SchemaBrowserTypes($first: Int) {\n typesList(first: $first) {\n id\n name\n description\n properties {\n id\n name\n dataType\n relationValueTypes {\n id\n name\n description\n properties {\n id\n name\n dataType\n }\n }\n }\n }\n }\n": typeof types.SchemaBrowserTypesDocument,
18-
"\n query TypeSearch($query: String!, $first: Int) {\n typesList: search(\n query: $query\n first: $first\n filter: {backlinksExist: true, typeIds: {in: [\"e7d737c5-3676-4c60-9fa1-6aa64a8c90ad\"]}}\n ) {\n id\n name\n description\n properties {\n id\n name\n dataType\n renderableType\n relationValueTypes {\n id\n name\n description\n properties {\n id\n name\n dataType\n }\n }\n }\n }\n }\n": typeof types.TypeSearchDocument,
18+
"\n query TypeSearch($query: String!, $first: Int) {\n typesList: search(\n query: $query\n first: $first\n filter: {backlinksExist: true, typeIds: {in: [\"e7d737c5-3676-4c60-9fa1-6aa64a8c90ad\"]}}\n ) {\n id\n name\n description\n properties {\n id\n name\n dataType\n relationValueTypes {\n id\n name\n description\n properties {\n id\n name\n dataType\n }\n }\n }\n }\n }\n": typeof types.TypeSearchDocument,
1919
"\n query Properties($query: String, $first: Int) {\n properties(\n first: $first\n filter: {or: [{name: {includesInsensitive: $query}}, {description: {includesInsensitive: $query}}]}\n ) {\n id\n name\n description\n dataType\n relationValueTypes {\n id\n name\n description\n properties {\n id\n dataType\n name\n }\n }\n }\n }\n": typeof types.PropertiesDocument,
2020
};
2121
const documents: Documents = {
2222
"\n query SchemaBrowserTypes($first: Int) {\n typesList(first: $first) {\n id\n name\n description\n properties {\n id\n name\n dataType\n relationValueTypes {\n id\n name\n description\n properties {\n id\n name\n dataType\n }\n }\n }\n }\n }\n": types.SchemaBrowserTypesDocument,
23-
"\n query TypeSearch($query: String!, $first: Int) {\n typesList: search(\n query: $query\n first: $first\n filter: {backlinksExist: true, typeIds: {in: [\"e7d737c5-3676-4c60-9fa1-6aa64a8c90ad\"]}}\n ) {\n id\n name\n description\n properties {\n id\n name\n dataType\n renderableType\n relationValueTypes {\n id\n name\n description\n properties {\n id\n name\n dataType\n }\n }\n }\n }\n }\n": types.TypeSearchDocument,
23+
"\n query TypeSearch($query: String!, $first: Int) {\n typesList: search(\n query: $query\n first: $first\n filter: {backlinksExist: true, typeIds: {in: [\"e7d737c5-3676-4c60-9fa1-6aa64a8c90ad\"]}}\n ) {\n id\n name\n description\n properties {\n id\n name\n dataType\n relationValueTypes {\n id\n name\n description\n properties {\n id\n name\n dataType\n }\n }\n }\n }\n }\n": types.TypeSearchDocument,
2424
"\n query Properties($query: String, $first: Int) {\n properties(\n first: $first\n filter: {or: [{name: {includesInsensitive: $query}}, {description: {includesInsensitive: $query}}]}\n ) {\n id\n name\n description\n dataType\n relationValueTypes {\n id\n name\n description\n properties {\n id\n dataType\n name\n }\n }\n }\n }\n": types.PropertiesDocument,
2525
};
2626

@@ -45,7 +45,7 @@ export function graphql(source: "\n query SchemaBrowserTypes($first: Int) {\n
4545
/**
4646
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
4747
*/
48-
export function graphql(source: "\n query TypeSearch($query: String!, $first: Int) {\n typesList: search(\n query: $query\n first: $first\n filter: {backlinksExist: true, typeIds: {in: [\"e7d737c5-3676-4c60-9fa1-6aa64a8c90ad\"]}}\n ) {\n id\n name\n description\n properties {\n id\n name\n dataType\n renderableType\n relationValueTypes {\n id\n name\n description\n properties {\n id\n name\n dataType\n }\n }\n }\n }\n }\n"): (typeof documents)["\n query TypeSearch($query: String!, $first: Int) {\n typesList: search(\n query: $query\n first: $first\n filter: {backlinksExist: true, typeIds: {in: [\"e7d737c5-3676-4c60-9fa1-6aa64a8c90ad\"]}}\n ) {\n id\n name\n description\n properties {\n id\n name\n dataType\n renderableType\n relationValueTypes {\n id\n name\n description\n properties {\n id\n name\n dataType\n }\n }\n }\n }\n }\n"];
48+
export function graphql(source: "\n query TypeSearch($query: String!, $first: Int) {\n typesList: search(\n query: $query\n first: $first\n filter: {backlinksExist: true, typeIds: {in: [\"e7d737c5-3676-4c60-9fa1-6aa64a8c90ad\"]}}\n ) {\n id\n name\n description\n properties {\n id\n name\n dataType\n relationValueTypes {\n id\n name\n description\n properties {\n id\n name\n dataType\n }\n }\n }\n }\n }\n"): (typeof documents)["\n query TypeSearch($query: String!, $first: Int) {\n typesList: search(\n query: $query\n first: $first\n filter: {backlinksExist: true, typeIds: {in: [\"e7d737c5-3676-4c60-9fa1-6aa64a8c90ad\"]}}\n ) {\n id\n name\n description\n properties {\n id\n name\n dataType\n relationValueTypes {\n id\n name\n description\n properties {\n id\n name\n dataType\n }\n }\n }\n }\n }\n"];
4949
/**
5050
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
5151
*/

packages/hypergraph/typesync-studio/src/generated/graphql.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1758,7 +1758,7 @@ export type TypeSearchQueryVariables = Exact<{
17581758
}>;
17591759

17601760

1761-
export type TypeSearchQuery = { __typename?: 'Query', typesList?: Array<{ __typename?: 'Entity', id: string, name?: string | null, description?: string | null, properties?: Array<{ __typename?: 'Property', id: string, name?: string | null, dataType: DataTypes, renderableType?: string | null, relationValueTypes?: Array<{ __typename?: 'Entity', id: string, name?: string | null, description?: string | null, properties?: Array<{ __typename?: 'Property', id: string, name?: string | null, dataType: DataTypes }> | null }> | null }> | null }> | null };
1761+
export type TypeSearchQuery = { __typename?: 'Query', typesList?: Array<{ __typename?: 'Entity', id: string, name?: string | null, description?: string | null, properties?: Array<{ __typename?: 'Property', id: string, name?: string | null, dataType: DataTypes, relationValueTypes?: Array<{ __typename?: 'Entity', id: string, name?: string | null, description?: string | null, properties?: Array<{ __typename?: 'Property', id: string, name?: string | null, dataType: DataTypes }> | null }> | null }> | null }> | null };
17621762

17631763
export type PropertiesQueryVariables = Exact<{
17641764
query?: InputMaybe<Scalars['String']['input']>;
@@ -1770,5 +1770,5 @@ export type PropertiesQuery = { __typename?: 'Query', properties?: Array<{ __typ
17701770

17711771

17721772
export const SchemaBrowserTypesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"SchemaBrowserTypes"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"first"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"typesList"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"first"},"value":{"kind":"Variable","name":{"kind":"Name","value":"first"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"properties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"dataType"}},{"kind":"Field","name":{"kind":"Name","value":"relationValueTypes"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"properties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"dataType"}}]}}]}}]}}]}}]}}]} as unknown as DocumentNode<SchemaBrowserTypesQuery, SchemaBrowserTypesQueryVariables>;
1773-
export const TypeSearchDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"TypeSearch"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"query"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"first"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"typesList"},"name":{"kind":"Name","value":"search"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"query"},"value":{"kind":"Variable","name":{"kind":"Name","value":"query"}}},{"kind":"Argument","name":{"kind":"Name","value":"first"},"value":{"kind":"Variable","name":{"kind":"Name","value":"first"}}},{"kind":"Argument","name":{"kind":"Name","value":"filter"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"backlinksExist"},"value":{"kind":"BooleanValue","value":true}},{"kind":"ObjectField","name":{"kind":"Name","value":"typeIds"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"in"},"value":{"kind":"ListValue","values":[{"kind":"StringValue","value":"e7d737c5-3676-4c60-9fa1-6aa64a8c90ad","block":false}]}}]}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"properties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"dataType"}},{"kind":"Field","name":{"kind":"Name","value":"renderableType"}},{"kind":"Field","name":{"kind":"Name","value":"relationValueTypes"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"properties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"dataType"}}]}}]}}]}}]}}]}}]} as unknown as DocumentNode<TypeSearchQuery, TypeSearchQueryVariables>;
1773+
export const TypeSearchDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"TypeSearch"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"query"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"first"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"typesList"},"name":{"kind":"Name","value":"search"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"query"},"value":{"kind":"Variable","name":{"kind":"Name","value":"query"}}},{"kind":"Argument","name":{"kind":"Name","value":"first"},"value":{"kind":"Variable","name":{"kind":"Name","value":"first"}}},{"kind":"Argument","name":{"kind":"Name","value":"filter"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"backlinksExist"},"value":{"kind":"BooleanValue","value":true}},{"kind":"ObjectField","name":{"kind":"Name","value":"typeIds"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"in"},"value":{"kind":"ListValue","values":[{"kind":"StringValue","value":"e7d737c5-3676-4c60-9fa1-6aa64a8c90ad","block":false}]}}]}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"properties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"dataType"}},{"kind":"Field","name":{"kind":"Name","value":"relationValueTypes"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"properties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"dataType"}}]}}]}}]}}]}}]}}]} as unknown as DocumentNode<TypeSearchQuery, TypeSearchQueryVariables>;
17741774
export const PropertiesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"Properties"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"query"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"first"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"properties"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"first"},"value":{"kind":"Variable","name":{"kind":"Name","value":"first"}}},{"kind":"Argument","name":{"kind":"Name","value":"filter"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"or"},"value":{"kind":"ListValue","values":[{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"name"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"includesInsensitive"},"value":{"kind":"Variable","name":{"kind":"Name","value":"query"}}}]}}]},{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"description"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"includesInsensitive"},"value":{"kind":"Variable","name":{"kind":"Name","value":"query"}}}]}}]}]}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"dataType"}},{"kind":"Field","name":{"kind":"Name","value":"relationValueTypes"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"properties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"dataType"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]}}]}}]}}]} as unknown as DocumentNode<PropertiesQuery, PropertiesQueryVariables>;

packages/hypergraph/typesync-studio/src/hooks/useKnowledgeGraph.tsx

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ const TypeSearch = graphql(`
5151
id
5252
name
5353
dataType
54-
renderableType
5554
relationValueTypes {
5655
id
5756
name
@@ -127,7 +126,7 @@ export const schemaBrowserQueryOptions = (
127126
vars: Readonly<{ query?: string | null | undefined; first?: number | null | undefined }>,
128127
) =>
129128
queryOptions({
130-
queryKey: ['SchemaBrowser', 'types', vars] as const,
129+
queryKey: ['Hypergraph', 'Typesync', 'Studio', 'Schema', 'types', vars] as const,
131130
async queryFn() {
132131
return await fetchSchemaTypes(vars.query, vars.first || undefined)
133132
.then((data) => data.typesList ?? [])
@@ -200,7 +199,10 @@ export function useSchemaBrowserQuery(
200199
Error,
201200
Array<ExtendedSchemaBrowserType>,
202201
readonly [
203-
'SchemaBrowser',
202+
'Hypergraph',
203+
'Typesync',
204+
'Studio',
205+
'Schema',
204206
'types',
205207
Readonly<{ query?: string | null | undefined; first?: number | null | undefined }>,
206208
]
@@ -262,7 +264,7 @@ export const propertiesQueryOptions = (
262264
vars: Readonly<{ query?: string | null | undefined; first?: number | null | undefined }>,
263265
) =>
264266
queryOptions({
265-
queryKey: ['SchemaBrowser', 'properties', vars] as const,
267+
queryKey: ['Hypergraph', 'Typesync', 'Studio', 'Schema', 'properties', vars] as const,
266268
async queryFn() {
267269
return await fetchProperties(vars.query, vars.first || undefined)
268270
.then((data) => data.properties ?? [])
@@ -322,7 +324,10 @@ export function usePropertiesQuery(
322324
Error,
323325
Array<ExtendedProperty>,
324326
readonly [
325-
'SchemaBrowser',
327+
'Hypergraph',
328+
'Typesync',
329+
'Studio',
330+
'Schema',
326331
'properties',
327332
Readonly<{ query?: string | null | undefined; first?: number | null | undefined }>,
328333
]

0 commit comments

Comments
 (0)