Skip to content
This repository was archived by the owner on Mar 10, 2025. It is now read-only.
This repository was archived by the owner on Mar 10, 2025. It is now read-only.

DefaultGormDataFetcher does not work for domains with not default datastore #31

Closed
@armsargis

Description

@armsargis

If I define domain with not default datastore like:

class Speaker {

    String firstName
    String lastName
    String name
    String email
    String bio

    static graphql = GraphQLMapping.build {
        operations.delete.enabled false
        //or
        //operations.get
        //operations.list
        //operations.count
        //operations.create
        //operations.update
        //operations.delete
    }

    static constraints = {
        email nullable: true, email: true
        bio nullable: true
    }

    static mapping = {
        datasource "rimm"  // <------ here

        bio type: 'text'
        name formula: 'concat(FIRST_NAME,\' \',LAST_NAME)'
        talks sort: 'id'
    }

}

I am getting error like:

curl -X "POST" "http://localhost:8080/graphql" \                                                                                                52 ↵  
     -H "Content-Type: application/graphql" \
     -d $'
{
  speakerCount
}'
{"data":{"speakerCount":null},"errors":[{"message":"Exception while fetching data (/speakerCount) : Class org.grails.gorm.graphql.fetcher.DefaultGormDataFetcher can not access a member of class org.grails.orm.hibernate.HibernateDatastore$2 with modifiers \"public volatile\"","errorType":"DataFetchingException","locations":[{"line":3,"column":3}]}]}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions