Download the PHP package lionixevolve/graphqlsuitecrm without Composer

On this page you can find all versions of the php package lionixevolve/graphqlsuitecrm. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package graphqlsuitecrm

Latest Stable Version Total Downloads Latest Unstable Version License

UPCOMING NEW VERSION SuiteCRM 8 will have GraphQL natively so only bugfixes and minor features!

Current code works well with SuiteCRM rest API. .

But I am already developing next version based on a much stronger PHP-GraphQL library webonyx/graphql. It is coming along nicely, has better performance, and I am using 100% V8 API endpoints (oauth-tokens instead of cookies).

GraphQLSuiteCRM

Use GraphQL instead of REST API to access SuiteCRM data. Production ready. Supports custom modules and custom REST endpoints with or without authentication. Can be integrated with SuiteCRM v8 API to be used with its native authentication.

What it does

This package allows to use GraphQL with SuiteCRM (8.x / 10.x) /SugarCRM (6.5) instead of the Rest API which is not truly REST.

Upong installation a graphql endpoint will be created vendor/lionixevolve/graphqlsuitecrm/rest.php/graphql and you can hit it with queries if you are authenticated on SuiteCRM (using cookies)

There are more undocumented functions in the endpoint, like getting dropdown values.TODO: Document this

Once you send a query to rest.php/graphql it uses a PHP SuiteCRM Graphql schema based on Youshido/GraphQL library to process your query.

This GraphQL library uses SuiteCRM/SugarCRM beans for almost all the actions, so every logic hook you created or workflow, should work as planned.

Set up

composer require lionixevolve/graphqlsuitecrm

This will install the plugin in the vendor folder with all the requirements.

PHP extension php-intl its a requirement, for ubuntu install as sudo apt-get install php-intl

Testing and Usage

GraphiQL is included in the package, to start using it open the web broser in http://localhost/vendor/lionixevolve/graphqlsuitecrm/graphql/GraphiQL/ (adjust localhost to the suitecrm instance location) Use the included GraphiQL to try this

it will get you the accounts module with the name of each one. Limited to 2. You can also use the offset:2 to paginate.

An advance example - retrieving all the cases by status. Also you can see some schema changes for the assigned_user/created_by users field that let you retrieve further information about the user.

As you can see related modules are also retrieved using the plural word of the relation. Accounts/Opportunities, etc.

Extending/Customizing Suitecrm Graphql Schema

The library will load custom files from the graphql folder.

Two main files are loaded

  1. graphql/CustomSuiteCRMSchema.php
  2. graphql/CustomRest.php

the #1 will extend the included schema, for custom modules or even non-suitecrm related queries. the #2 will allow you to create your own REST endpoint calls, we use this for report generation where graphql resultset is not very efficient. (like using aggrid compatible resultset)

A full example of how to extend is below.

Extending the Schema -

Here I am creating support for prospectlist which is not included (yet) in the main library.

This is extracted from a working setup

With these 2 files you will have QUERY support for ProspectLists (mutation os prospectlist itself is missing in this example)

Prospectlists is useful for segmenting audience, contacts, accounts and leads so the following mutation will relate the Bean and the prospect.

Customizing the Rest endpoint

CORS

If you need support for CORS you may use the graphql/CustomRest.php and include the following snippet

The CORS middleware will take care of allowing the specified hosts to access the API and return valid headers.

GraphiQL

You can use the included GraphiQL here: vendor/lionixevolve/graphqlsuitecrm/graphql/GraphiQL/

Known Issues

TODO


All versions of graphqlsuitecrm with dependencies

PHP Build Version
Package Version
Requires slim/slim Version ~3.12
gargron/fileupload Version ~1.4.0
youshido/graphql Version ^v1.5
monolog/monolog Version ^1.23
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package lionixevolve/graphqlsuitecrm contains the following files

Loading the files please wait ....