Anybody using Aurelia with graphql - aurelia

My backend exposes graphql wanted to know what is your experience with aurelia and graphql.
Are there any good libraries out there to use?
I could only find a minimal apollo bind library here https://github.com/stphdenis/aurelia-apollo-bind

Aurelia does not impose any restrictions. From examples I see in graphql docs there is nothing you can't do with Aurelia.
There is no need in specific bridge or wrapper library.

I suppose you can use this Angular 9 sample https://www.youtube.com/watch?v=GifdPhc_OWU
You will need the same GraphQL queries generator. And a similar way of calling a back-end.
I guess it is even possible to write content item templates in Aurelia syntax in place of Liquid templates of content type definitions, gather them to front-end along with JSON and render together. I would try to achieve that.

Related

Why is it called Options API in Vue.js? How exactly is it an API?

I am newer to programming and looking at Vue.js. I understand that an API is basically a software intermediary that allows two pieces of software to talk to each other? I don't understand why in Vue.js the system for setting up the component with data, methods, etc. is known as "Options API". Isn't is just part of Vue? What exactly are the 2 pieces of software the Options API are connecting?
Perhaps I need a better understanding of what API means in a more modern context as well!
TL;DR: options API it's a Vue lifecycle connector.
Options API of course is part of Vue. Is the way we use to communicate with Vue's core, so we can manipulate the app. They have their own structure, like React.
Vue has his own lifecycle:
Knowing that, we can start building our app around Vue.
We use Options API in a Vue application to write and define different components. With this API, we can use options such as methods, watchers, mounted, created, beforeMounted, etc...
Compare it with a normal JS app and you will see WHY it's called "API"

How to use vue components in a svelte app?

I really love using Svelte but at this moment, one of its cons is the lack of ready-to-use components for Svelte. I want to use vue-atlaskit in a project, but I really prefer using Svelte. Is it possible to use vue components inside a Svelte app?
I guess it all should be just "web-components", but I really don't know how to do it.
I checked with people in the Svelte Discourse. There is no simple way to do that. The suggestion is to convert the UI components I need from Vue to Svelte.
While not a comprehensive answer, I would add some findings on the topic:
As you suggested, I would try with Web Components. According to Custom Elements Everywhere the support for Web Components is fairly high for both frameworks. Vue states that the support is 100% although the site shows less so there is some discrepancy. But basic tests pass 100%. Svelte is also at 100%. This paints a fairly positive picture.
There is another question on SO that refers to consuming Web Components in Svelte.
Here is another reference article on how to create web components with Vue 3.
Note: I will try to update the answer as I learn more. I will be testing this out on a migration of a PWA from Vue to Svelte, where I plan first to use Svelte components in an existing Vue app and then perhaps switch to using Vue components in a Svelte app, depending on how things go with rewriting.

Vue.js reactivity features in backend application?

I'm wondering if there's someone knowledgeable in Vue(2 or 3)'s reactivity that might be able to answer this question and explain reasons.
This is regarding features such as data() reactivity (getters & setters), computed properties, a global Vue instance, and even a Vuex store.
Is there a way I could tap into just these non-browser javascript features for use in a backend-only Node.js application?
I need a way to have a global store holding temporary data that can update "components" in other files via mapState/mapGetters.
I'm using lowdb currently for this because it suits my needs in terms of shapeable JSON objects, where something like redis is key:value-only. (Don't want to get into a more complex redis/rejson setup.)
Basically I need a globally accessible relatively-full-featured reactivity system on the backend, without global variables or needing to set up a custom Rxjs system, which is a bit over my head and will take too much momentum away from my goals, time-wise.
I'd appreciate any input. Thanks 🙂
Vue is designed to run inside Node to support SSR (server side rendering). There is already a good post here on SO with simple sample for Vue 2 (using Vue + Vuex)
But it seems overkill to me. If you want something much simpler and lightweight, you can use package #vue/reactivity which is normally part of the Vue 3 but can be used completely standalone. It is basically Vue 3 reactivity system based on JS proxies
Why would I choose this approach:
No Vue 2 Change Detection Caveats
More "functional" API (designed for their new Composition API) with much better support for TypeScript and type inference (even without TS)
I think Vuex API is super bad (using string constants for data mapping - especially with modules. It's pain...)
As it is part of Vue 3, you can use it's documentation:
Basic Reactivity APIs
Refs

How can I use CKEditor 5 classic in VueJS 2 WITHOUT NPM?

My question is simple. I'm using VueJS 2, and I want to implement CKEditor 5 Classic. I know better than to just hook it up in HTML, but due to constraints I can NOT use NPM/Webpack. I need a component wrapper that's in JS format.
Can anyone help?
What do you mean when you say "I know better than to just hook it up in HTML"? After all, the files are included in your HTML anyways, that's how HTML works with JavaScript.
The best option is to use the corresponding source-file from CDN of CKEditor. Either by including the direct CDN link or (in case you have doubts about availability) after you download them manually or via shell and ship them with your application.
If you don't want to go one of these ways, I don't think you'll be able to use the desired library at all.

Highcharts Java Api wrapper for JSF?

I am looking on the official site of Highcharts for Api wrappers and it does not contain an Api wrapper for Java. It only has highcharts-serverside-export which is for generating images on server side. Does anybody know if something like DotNet.Highcharts exists for JSF? I have come across this question as how to use Highcharts with JSF, but surely there must be some Api like that from .NET?
I came across the same problem as you. I started writing my own custom components to bridge JSF and highcharts. I have made my code available. It's not a full wrapper, but it's better than nothing.