mirror of
https://git.vectorsigma.ru/public/photoview.git
synced 2026-08-03 20:59:03 +00:00
Update gqlgen and fix the code. (#1055)
This commit is contained in:
@@ -11,6 +11,7 @@ import (
|
||||
"github.com/photoview/photoview/api/graphql/resolvers"
|
||||
"github.com/photoview/photoview/api/server"
|
||||
"github.com/photoview/photoview/api/utils"
|
||||
"github.com/vektah/gqlparser/v2/ast"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
@@ -35,10 +36,10 @@ func GraphqlEndpoint(db *gorm.DB) *graphql_handler.Server {
|
||||
graphqlServer.AddTransport(transport.POST{})
|
||||
graphqlServer.AddTransport(transport.MultipartForm{})
|
||||
|
||||
graphqlServer.SetQueryCache(lru.New(1000))
|
||||
graphqlServer.SetQueryCache(lru.New[*ast.QueryDocument](1000))
|
||||
|
||||
graphqlServer.Use(extension.AutomaticPersistedQuery{
|
||||
Cache: lru.New(100),
|
||||
Cache: lru.New[string](100),
|
||||
})
|
||||
|
||||
if utils.DevelopmentMode() {
|
||||
|
||||
Reference in New Issue
Block a user