File tree Expand file tree Collapse file tree 3 files changed +12
-2
lines changed
packages/studio-website/src Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Original file line number Diff line number Diff line change 11interface Window {
2- GS_ENGINE_TYPE : 'groot' | 'interactive' ;
2+ GS_ENGINE_TYPE : 'groot' | 'interactive' | 'gart' ;
33}
Original file line number Diff line number Diff line change @@ -60,6 +60,14 @@ export default function StudioLayout() {
6060 }
6161 } ) ;
6262 } ;
63+ const setQueryConfig = ( ) => {
64+ const { GS_ENGINE_TYPE } = window ;
65+
66+ if ( GS_ENGINE_TYPE === 'groot' ) {
67+ Utils . storage . set ( 'query_language' , 'gremlin' ) ;
68+ Utils . storage . set ( 'query_initiation' , 'Server' ) ;
69+ }
70+ } ;
6371 useEffect ( ( ) => {
6472 ( async ( ) => {
6573 const engineType = ( await depolymentInfo ( ) ) as 'interactive' | 'groot' ;
@@ -71,6 +79,8 @@ export default function StudioLayout() {
7179 } ;
7280 } ) ;
7381 window . GS_ENGINE_TYPE = engineType ;
82+
83+ setQueryConfig ( ) ;
7484 /**接着校验可用的graphId */
7585 const checkedRes = await checkGraphId ( ) ;
7686 if ( checkedRes ) {
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ export const initialStore = {
3434 graphId : Utils . searchParamOf ( 'graph_id' ) ,
3535 draftGraph : Utils . storage . get ( 'DRAFT_GRAPH' ) || { } ,
3636 draftId : 'DRAFT_GRAPH' ,
37- displaySidebarType : Utils . storage . get < 'Sidebar' | 'Segmented' > ( 'displaySidebarType' ) || 'Sidebar ' ,
37+ displaySidebarType : Utils . storage . get < 'Sidebar' | 'Segmented' > ( 'displaySidebarType' ) || 'Segmented ' ,
3838 displaySidebarPosition : Utils . storage . get < 'left' | 'right' > ( 'displaySidebarPosition' ) || 'left' ,
3939 isReady : false ,
4040} ;
You can’t perform that action at this time.
0 commit comments