Tag: visual-studio-code
-
How to support ‘.gql’ files for EsLint and Prettier in VS Code
-1 In my project I have some .gql files: src/components/mycomponent/MyComponent.gql import { gql } from ‘@apollo/client’; export default gql` query MyQuery { myQuery { test } } ` In my VS Code settings file I added: // .vscode/settings.json { "eslint.validate": [ "javascript", "javascriptreact", "astro", "typescript", "typescriptreact", "gql" ], // rest of the config } In…
-
Golang,gorm, postgress: invalid input is inserted
0 when i perform request using https://localhost:8080/graphql end point I cant create user using mutation **the whole code:** package main import ( "fmt" "log" "net/http" "time" "github.com/graphql-go/graphql" "github.com/graphql-go/handler" "github.com/kaleabbyh/foodrecipie/config" _ "github.com/lib/pq" ) ** Note: the table users is succesfullly migrated using separate migration code having ‘User’ attributes** type User struct { ID int `gorm:"type:int;primary_key;identity(100,1)"` Name…
-
graphql import fragment
0 I have a graphql extension for vscode. It works fine, I got a highlight and param hints but can’t get fragments to work properly.. client: { service: { name: ‘test’, localSchemaFile: ‘./schema.json’, includes: [‘./graphql/**/*.graphql’], }, }, } This is my setup, and I import fragment with line… #import "…/file.graphql" and vscode says "unknown fragment"…
-
How can I make my VS Code extension provide suggestions and syntax-highlighting for non-JS code in ES6 tagged template literal strings?
5 I’m working on a GraphQL extension for Visual Studio Code that implements syntax highlighting and auto-completion for GraphQL schemas and queries. It currently works on files ending with the .gql extension. However, a common GraphQL usage is to define inline queries inside JavaScript/TypeScript files, for instance: @connect(gql`user(id: 2) { name, email }`) function MyUIComponent({…