alkem-io / server

Core server in the Alkemio platform, offering a GraphQL api for interacting with the logical domain model.
http://alkem.io
European Union Public License 1.2
24 stars 4 forks source link

BUG: aiPersona interaction mode is not queryable #4149

Open Comoque1 opened 1 week ago

Comoque1 commented 1 week ago

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

  1. Go to acc-alkem.io/graphql
  2. Perform the following query:
    query {
    virtualContributors {
    account {
      activeSubscription {
        expires
        name
      }
      license {
        id
        visibility
      }
    }
    aiPersona {
      bodyOfKnowledgeType
      dataAccessMode
      description
      interactionModes
    }
    searchVisibility
    listedInStore
    profile {
      displayName
    }
    }
    }
  3. Error is thrown: "message": "Enum \"AiPersonaBodyOfKnowledgeType\" cannot represent value: \"\"",
  4. See error image.png

Expected behavior aiPersona all fields are queryable

valentinyanakiev commented 1 week ago

"message": "Enum \"AiPersonaInteractionMode\" cannot represent value: \"[discussion-tagging]\"", "locations": [ { "line": 17, "column": 7 } ], "path": [ "virtualContributors", 10, "aiPersona", "interactionModes", 0 ], "extensions": { "code": "INTERNAL_SERVER_ERROR", "stacktrace": [ "GraphQLError: Enum \"AiPersonaInteractionMode\" cannot represent value: \"[discussion-tagging]\"", " at GraphQLEnumType.serialize (/usr/src/app/node_modules/graphql/type/definition.js:1103:13)", " at completeLeafValue (/usr/src/app/node_modules/graphql/execution/execute.js:738:39)", " at completeValue (/usr/src/app/node_modules/graphql/execution/execute.js:619:12)", " at completeValue (/usr/src/app/node_modules/graphql/execution/execute.js:584:23)", " at /usr/src/app/node_modules/graphql/execution/execute.js:696:25", " at Function.from ()", " at completeListValue (/usr/src/app/node_modules/graphql/execution/execute.js:676:34)", " at completeValue (/usr/src/app/node_modules/graphql/execution/execute.js:607:12)", " at completeValue (/usr/src/app/node_modules/graphql/execution/execute.js:584:23)", " at executeField (/usr/src/app/node_modules/graphql/execution/execute.js:489:19)", " at executeFields (/usr/src/app/node_modules/graphql/execution/execute.js:413:20)", " at completeObjectValue (/usr/src/app/node_modules/graphql/execution/execute.js:914:10)", " at completeValue (/usr/src/app/node_modules/graphql/execution/execute.js:635:12)", " at /usr/src/app/node_modules/graphql/execution/execute.js:486:9", " at process.processTicksAndRejections (node:internal/process/task_queues:95:5)", " at async Promise.all (index 1)" ] } },

techsmyth commented 1 week ago

Data dependent, here is the results of a local run: image

I suspect it is due to having VCs / AI Personas that do not then have a bon type set e.g. community engine or help?

Can you please look at the data in the column in production for the ai_persona table?