Git Product home page Git Product logo

emapi's Introduction

eMAPI

This is a sample Electron app hosting GraphiQL connected to Electron-GqlMAPI. It is intended first as a code sample for CppGraphQLGen, but it aspires to be the spiritual successor to MFCMAPI. It is already quite powerful just by integrating GraphiQL, and it has the potential to add more diagnostic and debugging features in the future.

This project was originally based on cppgraphiql, but it has many upgrades to the build process, packaging, and the implementation since then. It is not cross-platform like cppgraphiql (which used a trivial service with mock data), but I intend to feed these improvements back into cppgraphiql. For now, this is a much better starting point if you want to implement your own Electron host for a CppGraphQLGen service.

Getting Started

To begin, you will need to satisfy the requirements for building GqlMAPI. If you are using Vcpkg to install CppGraphQLGen and GoogleTest as suggested in those instructions, then you will also need to save an npm config setting for CMake.js to use the vcpkg.cmake toolchain file:

> npm config set cmake_CMAKE_TOOLCHAIN_FILE %VCPKG_ROOT%\scripts\buildsystems\vcpkg.cmake

Then you can build and test the module using npm:

> npm install
> npm run electron-dev

Sample Queries

This query should return the display name and ID of all your MAPI stores:

query AllStores {
  stores {
    name
    id
  }
}

To get the default store you can sort the stores in descending order by the PR_DEFAULT_STORE property and then take just the top element:

query DefaultStore {
  stores @orderBy(sorts: [
      {
        property: {id: 13312},
        type: BOOL,
        descending: true
      }
  ]) @take(count: 1) {
    name
    id
  }
}

If everything is working, you should get results like this (minus the rectangles hiding personal information):

eMAPI displaying results of DefaultStore query

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

Trademarks

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.

emapi's People

Contributors

dependabot[bot] avatar microsoft-github-operations[bot] avatar microsoftopensource avatar wravery avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.