Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Taxonomy term vocabulary not working #26

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

njt1982
Copy link

@njt1982 njt1982 commented Oct 25, 2019

I think the problem lies around here:

return isset($value->{$property}) ? $value->{$property} : null;

If I do this:

query {
  taxonomy_term(tid:"27074" ) {
    tid
    name
    vocabulary {
      vid
      name
    }
  }
}

I get:

  "data": {
    "taxonomy_term": [
      {
        "tid": "27074",
        "name": "",
        "vocabulary": null
      }
    ]
  },

I think this is because vocabulary is being treated as a property on a term?

@njt1982
Copy link
Author

njt1982 commented Oct 25, 2019

Hmm.. entity_get_property_info() returns vocabulary as a property on tazonomy_term...

@njt1982
Copy link
Author

njt1982 commented Oct 25, 2019

With this change, the above query works:

  "data": {
    "taxonomy_term": [
      {
        "tid": "27074",
        "name": "",
        "vocabulary": {
          "vid": "5",
          "name": "[REDACTED]"
        }
      }
    ]
  },

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant