Skip to content

olragon/graphql_api

Repository files navigation

GraphQL API for Drupal 7

Build Status

The problems

All the cool thing seems to be happening on Drupal 8 which are includes GraphQL.

This module attempt bring GraphQL to Drupal 7.

For Drupal 8, you should use http://drupal.org/project/graphql

The tools

The plans

  1. Create module graphql_api
  2. Create class Drupal\grapql\_api\Schema to build GraphQL schema
    • use hook_entity_info(), hook_entity_property_info() to build GraphQL schema
    • map Drupal concept to GraphQL concept
      • Entity type -> Interface
      • Entity bundle -> Object
      • Entity revision -> Object
      • Property, Field API -> Property
    • resolve relationship use entity metadata info
      • Base field uid -> Inteface: user
      • Base field rid -> Object: revision
      • Field API: term_reference -> Interface: term
      • Field API: entityreference -> Interface/Object target entity
      • Field API: relation -> Interface/Object target entity
  3. Create GraphQL endpoint /graphql
    • receive POST content with GrapQL query and variables
    • execute query and return result

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages