diff --git a/server/src/entities/connection/connection.model.ts b/server/src/entities/connection/connection.model.ts index 72ca3327..31cb6fd1 100644 --- a/server/src/entities/connection/connection.model.ts +++ b/server/src/entities/connection/connection.model.ts @@ -11,7 +11,7 @@ export class Connection { @Field() id: string; - @Field() + @Field({ nullable: true }) @Prop({ index: true }) from: string; diff --git a/web/src/components/system-view/map/map-data/build-connection-tree.ts b/web/src/components/system-view/map/map-data/build-connection-tree.ts index 024ec100..efd39d3f 100644 --- a/web/src/components/system-view/map/map-data/build-connection-tree.ts +++ b/web/src/components/system-view/map/map-data/build-connection-tree.ts @@ -15,8 +15,7 @@ const findChildren = ( ); const directChildren = connectionsWithoutReverse.filter( - //FIXME: This will probably break for unknown destinations. - (conn) => conn.from === start.to, + (conn) => start.to && conn.from === start.to, ); if (directChildren.length === 0) { diff --git a/web/src/generated/graphqlOperations.ts b/web/src/generated/graphqlOperations.ts index 7674720f..87a46d4b 100644 --- a/web/src/generated/graphqlOperations.ts +++ b/web/src/generated/graphqlOperations.ts @@ -62,7 +62,7 @@ export type ChainRoot = { children: Array; eol: Scalars['Boolean']['output']; eolAt?: Maybe; - from: Scalars['String']['output']; + from?: Maybe; id: Scalars['String']['output']; k162: Scalars['Boolean']['output']; massStatus: MassStatus; @@ -83,7 +83,7 @@ export type Connection = { __typename?: 'Connection'; eol: Scalars['Boolean']['output']; eolAt?: Maybe; - from: Scalars['String']['output']; + from?: Maybe; id: Scalars['String']['output']; k162: Scalars['Boolean']['output']; massStatus: MassStatus; @@ -210,7 +210,7 @@ export type GraphConnection = { depth: Scalars['Float']['output']; eol: Scalars['Boolean']['output']; eolAt?: Maybe; - from: Scalars['String']['output']; + from?: Maybe; id: Scalars['String']['output']; k162: Scalars['Boolean']['output']; massStatus: MassStatus; @@ -589,7 +589,7 @@ export type FindConnectionGraphQueryVariables = Exact<{ }>; -export type FindConnectionGraphQuery = { __typename?: 'Query', findConnectionGraph: { __typename?: 'FindConnectionGraph', root: string, chains: Array<{ __typename?: 'ChainRoot', id: string, from: string, to?: string | null, type?: string | null, k162: boolean, eol: boolean, eolAt?: any | null, massStatus: MassStatus, reverse: string, children: Array<{ __typename?: 'GraphConnection', id: string, from: string, to?: string | null, type?: string | null, k162: boolean, eol: boolean, eolAt?: any | null, massStatus: MassStatus, reverse: string, depth: number }> }> } }; +export type FindConnectionGraphQuery = { __typename?: 'Query', findConnectionGraph: { __typename?: 'FindConnectionGraph', root: string, chains: Array<{ __typename?: 'ChainRoot', id: string, from?: string | null, to?: string | null, type?: string | null, k162: boolean, eol: boolean, eolAt?: any | null, massStatus: MassStatus, reverse: string, children: Array<{ __typename?: 'GraphConnection', id: string, from?: string | null, to?: string | null, type?: string | null, k162: boolean, eol: boolean, eolAt?: any | null, massStatus: MassStatus, reverse: string, depth: number }> }> } }; export type UserFieldsForManagerFragment = { __typename?: 'SanitizedUserForManager', id: string, systemRole: SystemRoles, main: { __typename?: 'HolenavCharacter', esiId: string, name: string, portraitUrl: string, isMain: boolean, corporation: { __typename?: 'HolenavCorporation', esiId: string, name: string, ticker: string }, alliance?: { __typename?: 'HolenavAlliance', esiId: string, name: string, ticker: string } | null } };