#typescript#codemirror#graphiql#graphql#lsp_mode#lsp_server#monaco_editor#vscode
GraphiQL is a powerful, open-source GraphQL IDE that helps you write, test, and explore GraphQL queries easily in your browser or desktop. It offers features like syntax highlighting, live error checking, and schema exploration, making it simpler to work with GraphQL APIs. The project is part of a monorepo that includes tools for different editors like CodeMirror and Monaco, providing a consistent and extensible development experience. Using this monorepo setup improves collaboration, code sharing, and maintenance across related tools, saving you time and effort when building or extending GraphQL IDEs. This means you get a reliable, efficient environment to develop GraphQL applications faster and with fewer errors.
https://github.com/graphql/graphiql
🚀 Вышел стабильный JavaScript движок от Google для Android
Новая стабильная библиотека Jetpack JavaScript Engine позволит разработчикам выполнять JS код в изолированной и ограниченной среде.
class MainActivity : ComponentActivity() {
// Теперь nullable, без lateinit
private var jsSandbox: JavaScriptSandbox? = null
private var jsIsolate: JavaScriptIsolate? = null
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
if (!JavaScriptSandbox.isSupported()) {
Log.e("JS", "JavaScriptSandbox не поддерживается")
return
}
lifecycleScope.launch {
// Создаём и сохраняем в nullable-поле
jsSandbox = JavaScriptSandbox
.createConnectedInstanceAsync(applicationContext)
.await()
jsIsolate = jsSandbox?.createIsolate()
// При выполнении гарантируем, что jsIsolate != null
val result: String = jsIsolate
?.evaluateJavaScriptAsync(JS_SCRIPT_SCRING)
?.await()
?: "Ошибка: isolate не инициализирован"
Log.d("JS", "Результат выполнения: $result")
}
}
override fun onDestroy() {
super.onDestroy()
// Закрываем только если не null
jsIsolate?.close()
jsSandbox?.close()
}
}
#jetpack#js