roneli / fastgql Goto Github PK
View Code? Open in Web Editor NEWBlazing fast, instant realtime & extendable GraphQL APIs powered by gqlgen
Home Page: https://www.fastgql.io/
License: MIT License
Blazing fast, instant realtime & extendable GraphQL APIs powered by gqlgen
Home Page: https://www.fastgql.io/
License: MIT License
Allow to insert relationship object in same graphql
When defined schema contains directive @generate
, query returns directive generate is not implemented
error.
Add
cfg.Directives["generate"] = config.DirectiveConfig{SkipRuntime: true}
to MutateConfig hook in schema/fastgql.go
Is this project discontinued?
Can we modify/config gqlgen to just return interface{} instead?
var data []*model.User
if err := pgxscan.ScanAll(&data, rows); err != nil {
return nil, err
}
Here from the example, we need to marshal the whole list of User struct, even if the request only ask for id/name. If this can just return interface{} then we dont need to marshal, only raw data from db it can be more optimal?
Add validation to Schema after it is generated for example:
if we defined a type we generate or a relation type we must be sure that a @table directive is defined on it.
Hi
I'm trying to apply fastgql directive (@tableName) in my graphql schema file like so:
type UserProfile @generateFilterInput(name: "UserProfileFilterInput") @tableName(name: "myapp.user_profile") {
userID: ID! @sqlRelation(relationType: ONE_TO_ONE, baseTable: "myapp_private.user_account", refTable: "janaez.user_profile", fields: ["id"], references: ["user_id"])
firstname: String
lastname: String
displayname: String!
createdAt: Time
updatedAt: Time
nationality: Country @sqlRelation(relationType: ONE_TO_ONE, baseTable: "myapp.country", refTable: "myapp.user_profile", fields: ["id"], references: ["nationality_id"])
}
type UserProfilePayload {
userID: ID! # userAccount.id
firstname: String
lastname: String
displayname: String
createdAt: Time
updatedAt: Time
nationality: Country
}
input UserProfileQueryInput {
firstname: String
lastname: String
displayname: String
nationalityID: Int
}
...and declared my GraphQL Query like so:
type Query {
# UserProfile
users(input: UserProfileQueryInput): [UserProfilePayload!]!
}
The problem:
When I run the GraphQL playground and try my query statement like this:
query GetAllUsers {
users{
userID
firstname
lastname
displayname
createdAt
updatedAt
nationality {
id
}
}
}
I receive this error:
{
"errors": [
{
"message": "ERROR: relation \"users\" does not exist (SQLSTATE 42P01)",
"path": [
"users"
]
}
],
"data": null
}
It looks like it's still using the Query type name and not the actual TableName as defined in the schema using @tableName directive!
Any ides please?!
Hello, fastGQL users, this is a basic roadmap to complete before releasing first version of fastgql.
if you have any suggestions or feature requests, you can add to this thread or open feature request issues depending on complexity/importance will add it to the roadmap
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.