xkojimedia / laravel-altair-graphql Goto Github PK
View Code? Open in Web Editor NEWEasily integrate Altair GraphQL Client into your Laravel project
License: MIT License
Easily integrate Altair GraphQL Client into your Laravel project
License: MIT License
I was wondering if there is the option for me to persist the queries and mutations to some config file or similar, so the frontend guys always have the newest versions of the samples I provide. I saw that there is the option to share it via graphqlbin but I was rather looking for something that I can have directly in my git project.
Thank you :)
Hey!
I just gave a shot to this library and I'm having trouble with accessing Altair.
I'm not sure what is wrong. I'm using Laravel 5.7 (with GraphQLite) and I just installed the package using:
composer require xkojimedia/laravel-altair-graphql
But when I try to access "/altair", I get a 404 error.
Also, when I run:
php artisan vendor:publish --provider="XKojiMedia\AltairGraphQL\AltairGraphQLServiceProvider" --tag=config
no configuration is published in the /config folder.
php artisan altair-graphql:download-assets
Above command giving below error.
Error
Undefined constant XKojiMedia\AltairGraphQL\DownloadAssetsCommand::JS_PATH_LOCAL
at C:\xampp\htdocs\projects\shop\graphqlservercopy\vendor\xkojimedia\laravel-altair-graphql\src\DownloadAssetsCommand.php:40
36▕ self::publicPath(self::CSS_PATH_LOCAL),
37▕ file_get_contents('https:'.self::CSS_PATH_CDN)
38▕ );
39▕ $this->fileForceContents(
➜ 40▕ self::publicPath(self::JS_PATH_LOCAL),
41▕ file_get_contents('https:'.self::JS_PATH_CDN)
42▕ );
43▕ $this->fileForceContents(
44▕ self::publicPath(self::FAVICON_PATH_LOCAL),
1 C:\xampp\htdocs\projects\shop\graphqlservercopy\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php:36
XKojiMedia\AltairGraphQL\DownloadAssetsCommand::handle()
2 C:\xampp\htdocs\projects\shop\graphqlservercopy\vendor\laravel\framework\src\Illuminate\Container\Util.php:40
Illuminate\Container\BoundMethod::Illuminate\Container{closure}()
After installing Altair in laravel 8.5 (local environment), we are getting below errors in browser console
main.js:1 Could not load doc utilsweb worker
(anonymous) @ main.js:1
(anonymous) @ main.js:1
(anonymous) @ main.js:1
(anonymous) @ main.js:1
e @ polyfills.js:1
_ @ main.js:1
t.getDocUtilsWorker @ main.js:1
(anonymous) @ main.js:1
(anonymous) @ main.js:1
(anonymous) @ main.js:1
(anonymous) @ main.js:1
e @ polyfills.js:1
_ @ main.js:1
t.updateDocs @ main.js:1
t.ngOnChanges @ main.js:1
e.type.ngOnChanges.e.onChanges @ main.js:1
Bt @ main.js:1
Vt @ main.js:1
Rt @ main.js:1
Bi @ main.js:1
Vi @ main.js:1
template @ main.js:1
tr @ main.js:1
Ji @ main.js:1
Sr @ main.js:1
(anonymous) @ main.js:1
Ji @ main.js:1
(anonymous) @ main.js:1
Ji @ main.js:1
Sr @ main.js:1
(anonymous) @ main.js:1
Ji @ main.js:1
er @ main.js:1
(anonymous) @ main.js:1
kr @ main.js:1
t.detectChanges @ main.js:1
e.tick @ main.js:1
e._loadComponent @ main.js:1
e.bootstrap @ main.js:1
(anonymous) @ main.js:1
e._moduleDoBootstrap @ main.js:1
(anonymous) @ main.js:1
e.invoke @ polyfills.js:1
onInvoke @ main.js:1
e.invoke @ polyfills.js:1
t.run @ polyfills.js:1
(anonymous) @ polyfills.js:1
e.invokeTask @ polyfills.js:1
onInvokeTask @ main.js:1
e.invokeTask @ polyfills.js:1
t.runTask @ polyfills.js:1
m @ polyfills.js:1
t.invokeTask @ polyfills.js:1
p @ polyfills.js:1
h @ polyfills.js:1
load (async)
D @ polyfills.js:1
e.scheduleTask @ polyfills.js:1
t.scheduleTask @ polyfills.js:1
t.scheduleEventTask @ polyfills.js:1
(anonymous) @ polyfills.js:1
(anonymous) @ altair:48
Show 25 more frames
main.js:1 DOMException: Failed to construct 'Worker': Script at 'http://cdn.jsdelivr.net/npm/altair-static/build/dist/0.worker.js' cannot be accessed from origin 'http://127.0.0.1:8000'.
at t. (http://cdn.jsdelivr.net/npm/altair-static/build/dist/main.js:1:140700)
at http://cdn.jsdelivr.net/npm/altair-static/build/dist/main.js:1:130479
at Object.next (http://cdn.jsdelivr.net/npm/altair-static/build/dist/main.js:1:130584)
at http://cdn.jsdelivr.net/npm/altair-static/build/dist/main.js:1:129520
at new e (http://cdn.jsdelivr.net/npm/altair-static/build/dist/polyfills.js:1:14960)
at _ (http://cdn.jsdelivr.net/npm/altair-static/build/dist/main.js:1:129265)
at t.getDocUtilsWorker (http://cdn.jsdelivr.net/npm/altair-static/build/dist/main.js:1:140519)
at t. (http://cdn.jsdelivr.net/npm/altair-static/build/dist/main.js:1:138358)
at http://cdn.jsdelivr.net/npm/altair-static/build/dist/main.js:1:130479
at Object.next (http://cdn.jsdelivr.net/npm/altair-static/build/dist/main.js:1:130584)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.