File tree Expand file tree Collapse file tree 2 files changed +5
-16
lines changed Expand file tree Collapse file tree 2 files changed +5
-16
lines changed Original file line number Diff line number Diff line change 88
99use ProcessWire \ProcessWire ;
1010
11- $ wireConfig = ProcessWire::buildConfig ($ pwDir , null , [
12- "siteDir " => "site-default "
13- ]);
11+ $ wireConfig = ProcessWire::buildConfig ($ pwDir );
1412$ wire = new ProcessWire ($ wireConfig );
1513
1614// =====================
1715// Setup GraphiQL Assets
1816// =====================
1917$ config = $ wire ->fuel ('config ' );
2018
21- $ config ->js ('ProcessGraphQL ' , [
22- 'GraphQLServerUrl ' => 'http://127.0.0.1:8091 ' ,
23- ]);
24-
25- $ config ->scripts ->add ("https://unpkg.com/es6-promise@4.2.8/dist/es6-promise.auto.min.js " );
26- $ config ->scripts ->add ("https://unpkg.com/whatwg-fetch@3.0.0/dist/fetch.umd.js " );
27- $ config ->scripts ->add ("https://unpkg.com/react@16.12.0/umd/react.production.min.js " );
28- $ config ->scripts ->add ("https://unpkg.com/react-dom@16.12.0/umd/react-dom.production.min.js " );
29- $ config ->scripts ->add ('https://unpkg.com/graphiql@0.14.2/graphiql.min.js ' );
30- $ config ->styles ->add ('https://unpkg.com/graphiql@0.14.2/graphiql.css ' );
19+ $ graphql = $ wire ->fuel ('modules ' )->get ('ProcessGraphQL ' );
20+ $ graphql ->GraphQLServerUrl = 'http://127.0.0.1:8091 ' ;
21+ $ graphql ->setupGraphiQLAssets ();
3122
3223$ filename = realpath ($ baseDir . $ _SERVER ['SCRIPT_NAME ' ]);
3324if ($ filename === $ baseDir ) {
Original file line number Diff line number Diff line change 1111
1212use ProcessWire \ProcessWire ;
1313
14- $ wireConfig = ProcessWire::buildConfig ($ pwDir , null , [
15- "siteDir " => "site-default "
16- ]);
14+ $ wireConfig = ProcessWire::buildConfig ($ pwDir );
1715$ wire = new ProcessWire ($ wireConfig );
1816$ modules = $ wire ->fuel ('modules ' );
1917
You can’t perform that action at this time.
0 commit comments